Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
more renaming in RWHV
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Röttsches committed Jun 17, 2013
1 parent 0bc0e7d commit 071f50b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
19 changes: 8 additions & 11 deletions content/browser/renderer_host/render_widget_host_view_efl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<RenderWidgetHostViewEfl*>(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
Expand Down Expand Up @@ -532,7 +528,7 @@ class RenderWidgetHostViewEflWidget {
return FALSE;
}

DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewEflWidget);
DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewEflEvasObject);
};

RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget_host)
Expand Down Expand Up @@ -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,
Expand Down
30 changes: 8 additions & 22 deletions content/browser/renderer_host/render_widget_host_view_efl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -32,8 +29,6 @@ typedef struct _GtkClipboard GtkClipboard;
typedef struct _GtkSelectionData GtkSelectionData;

namespace content {
class GtkIMContextWrapper;
class GtkKeyBindingsHandler;
class RenderWidgetHost;
class RenderWidgetHostImpl;
struct NativeWebKeyboardEvent;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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_;
Expand Down Expand Up @@ -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<GtkIMContextWrapper> im_context_;

// A convenience object for handling editor key bindings defined in gtk
// keyboard theme.
scoped_ptr<GtkKeyBindingsHandler> 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.
Expand All @@ -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<BrowserAccessibilityManager> browser_accessibility_manager_;

ui::GtkSignalRegistrar signals_;
// ui::GtkSignalRegistrar signals_;
};

} // namespace content
Expand Down

0 comments on commit 071f50b

Please sign in to comment.