From 071f50b28f846057f7bcb6ee152cdab4604c8b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= Date: Mon, 17 Jun 2013 14:20:44 +0300 Subject: [PATCH] more renaming in RWHV --- .../render_widget_host_view_efl.cc | 19 +++++------- .../render_widget_host_view_efl.h | 30 +++++-------------- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/content/browser/renderer_host/render_widget_host_view_efl.cc b/content/browser/renderer_host/render_widget_host_view_efl.cc index de1224361f132..cdb55444b95c1 100644 --- a/content/browser/renderer_host/render_widget_host_view_efl.cc +++ b/content/browser/renderer_host/render_widget_host_view_efl.cc @@ -105,14 +105,10 @@ bool MovedToPoint(const WebKit::WebMouseEvent& mouse_event, // This class is a simple convenience wrapper for Gtk functions. It has only // static methods. -class RenderWidgetHostViewEflWidget { +class RenderWidgetHostViewEflEvasObject { public: - static AtkObject* GetAccessible(void* userdata) { - return (static_cast(userdata))-> - GetAccessible(); - } - static GtkWidget* CreateNewWidget(RenderWidgetHostViewEfl* host_view) { + static Evas_Object* CreateNewWidget(RenderWidgetHostViewEfl* host_view) { GtkWidget* widget = gtk_preserve_window_new(); gtk_widget_set_name(widget, "chrome-render-widget-host-view"); // We manually double-buffer in Paint() because Paint() may or may not be @@ -532,7 +528,7 @@ class RenderWidgetHostViewEflWidget { return FALSE; } - DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewEflWidget); + DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewEflEvasObject); }; RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget_host) @@ -995,10 +991,11 @@ bool RenderWidgetHostViewEfl::IsPopup() const { } void RenderWidgetHostViewEfl::DoSharedInit() { - view_.Own(RenderWidgetHostViewEflWidget::CreateNewWidget(this)); - im_context_.reset(new GtkIMContextWrapper(this)); - plugin_container_manager_.set_host_widget(view_.get()); - key_bindings_handler_.reset(new GtkKeyBindingsHandler(view_.get())); + view_.Own(RenderWidgetHostViewEflEvasObject::CreateNewWidget(this)); + // TODO: Find EFL alternatives for these + // im_context_.reset(new GtkIMContextWrapper(this)); + // plugin_container_manager_.set_host_widget(view_.get()); + // key_bindings_handler_.reset(new GtkKeyBindingsHandler(view_.get())); } void RenderWidgetHostViewEfl::DoPopupOrFullscreenInit(GtkWindow* window, diff --git a/content/browser/renderer_host/render_widget_host_view_efl.h b/content/browser/renderer_host/render_widget_host_view_efl.h index d54f08e6eb463..e53ee456ad7a4 100644 --- a/content/browser/renderer_host/render_widget_host_view_efl.h +++ b/content/browser/renderer_host/render_widget_host_view_efl.h @@ -18,9 +18,6 @@ #include "ipc/ipc_sender.h" #include "ui/base/animation/animation_delegate.h" #include "ui/base/animation/slide_animation.h" -#include "ui/base/gtk/gtk_signal.h" -#include "ui/base/gtk/gtk_signal_registrar.h" -#include "ui/base/gtk/owned_widget_gtk.h" #include "ui/base/x/active_window_watcher_x_observer.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" @@ -32,8 +29,6 @@ typedef struct _GtkClipboard GtkClipboard; typedef struct _GtkSelectionData GtkSelectionData; namespace content { -class GtkIMContextWrapper; -class GtkKeyBindingsHandler; class RenderWidgetHost; class RenderWidgetHostImpl; struct NativeWebKeyboardEvent; @@ -187,11 +182,7 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl explicit RenderWidgetHostViewEfl(RenderWidgetHost* widget); private: - friend class RenderWidgetHostViewEflWidget; - - CHROMEGTK_CALLBACK_0(RenderWidgetHostViewEfl, - void, - OnDestroy); + friend class RenderWidgetHostViewEflEvasObject; // Returns whether the widget needs an input grab (GTK+ and X) to work // properly. @@ -225,7 +216,8 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl RenderWidgetHostImpl* host_; // The native UI widget. - ui::OwnedWidgetGtk view_; + // TODO: Do we need lifetime handling like OwnedWidgetGtk? + gfx::NativeView view_; // This is true when we are currently painting and thus should handle extra // paint requests by expanding the invalid rect rather than actually @@ -253,7 +245,7 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl base::TimeTicks web_contents_switch_paint_time_; // The native view of our parent widget. Used only for popups. - GtkWidget* parent_; + Evas_Object* parent_; // We ignore the first mouse release on popups so the popup will remain open. bool is_popup_first_mouse_release_; @@ -294,15 +286,9 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl // so we keep it ID here. unsigned long destroy_handler_id_; - // A convenience wrapper object for GtkIMContext; - scoped_ptr im_context_; - - // A convenience object for handling editor key bindings defined in gtk - // keyboard theme. - scoped_ptr key_bindings_handler_; - + // TODO: Find a replacement for that on EFL // Helper class that lets us allocate plugin containers and move them. - webkit::npapi::GtkPluginContainerManager plugin_container_manager_; + // webkit::npapi::GtkPluginContainerManager plugin_container_manager_; // The size that we want the renderer to be. We keep this in a separate // variable because resizing in GTK+ is async. @@ -327,13 +313,13 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl // The event for the last mouse down we handled. We need this for context // menus and drags. - GdkEventButton* last_mouse_down_; + // GdkEventButton* last_mouse_down_; // Instance of accessibility information for the root of the AtkObject // tree representation of the WebKit render tree. scoped_ptr browser_accessibility_manager_; - ui::GtkSignalRegistrar signals_; + // ui::GtkSignalRegistrar signals_; }; } // namespace content