diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 14:43:12 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 14:43:12 +0000 |
commit | 2fc6672f21decd142da98665de2a0330b2e0ac57 (patch) | |
tree | 52246ce158462b88cd4cc8cad667eb28a039e2b3 /views/controls | |
parent | e8491289e4313d396ea9e1522209c1305d60a227 (diff) | |
download | chromium_src-2fc6672f21decd142da98665de2a0330b2e0ac57.zip chromium_src-2fc6672f21decd142da98665de2a0330b2e0ac57.tar.gz chromium_src-2fc6672f21decd142da98665de2a0330b2e0ac57.tar.bz2 |
Rename WidgetWin/Gtk -> NativeWidgetWin/Gtk.
BUG=72040
TEST=none
TBR=sky
Review URL: http://codereview.chromium.org/7039050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/menu/menu_host_gtk.cc | 14 | ||||
-rw-r--r-- | views/controls/menu/menu_host_gtk.h | 6 | ||||
-rw-r--r-- | views/controls/menu/menu_host_win.cc | 8 | ||||
-rw-r--r-- | views/controls/menu/menu_host_win.h | 6 | ||||
-rw-r--r-- | views/controls/menu/native_menu_gtk.cc | 10 | ||||
-rw-r--r-- | views/controls/native/native_view_host.cc | 4 | ||||
-rw-r--r-- | views/controls/native/native_view_host_gtk.cc | 14 | ||||
-rw-r--r-- | views/controls/native/native_view_host_gtk.h | 4 | ||||
-rw-r--r-- | views/controls/native_control_win.cc | 4 | ||||
-rw-r--r-- | views/controls/native_control_win.h | 8 | ||||
-rw-r--r-- | views/controls/tabbed_pane/native_tabbed_pane_gtk.cc | 3 | ||||
-rw-r--r-- | views/controls/tabbed_pane/native_tabbed_pane_gtk.h | 2 | ||||
-rw-r--r-- | views/controls/textfield/native_textfield_gtk.cc | 5 |
13 files changed, 44 insertions, 44 deletions
diff --git a/views/controls/menu/menu_host_gtk.cc b/views/controls/menu/menu_host_gtk.cc index 553bca3..962d701 100644 --- a/views/controls/menu/menu_host_gtk.cc +++ b/views/controls/menu/menu_host_gtk.cc @@ -23,7 +23,7 @@ namespace views { // MenuHostGtk, public: MenuHostGtk::MenuHostGtk(internal::NativeMenuHostDelegate* delegate) - : WidgetGtk(delegate->AsNativeWidgetDelegate()), + : NativeWidgetGtk(delegate->AsNativeWidgetDelegate()), did_input_grab_(false), delegate_(delegate) { } @@ -80,10 +80,10 @@ NativeWidget* MenuHostGtk::AsNativeWidget() { } //////////////////////////////////////////////////////////////////////////////// -// MenuHostGtk, WidgetGtk overrides: +// MenuHostGtk, NativeWidgetGtk overrides: void MenuHostGtk::InitNativeWidget(const Widget::InitParams& params) { - WidgetGtk::InitNativeWidget(params); + NativeWidgetGtk::InitNativeWidget(params); // Make sure we get destroyed when the parent is destroyed. gtk_window_set_destroy_with_parent(GTK_WINDOW(GetNativeView()), TRUE); gtk_window_set_type_hint(GTK_WINDOW(GetNativeView()), @@ -91,7 +91,7 @@ void MenuHostGtk::InitNativeWidget(const Widget::InitParams& params) { } void MenuHostGtk::ReleaseMouseCapture() { - WidgetGtk::ReleaseMouseCapture(); + NativeWidgetGtk::ReleaseMouseCapture(); if (did_input_grab_) { did_input_grab_ = false; gdk_pointer_ungrab(GDK_CURRENT_TIME); @@ -105,7 +105,7 @@ void MenuHostGtk::ReleaseMouseCapture() { void MenuHostGtk::OnDestroy(GtkWidget* object) { delegate_->OnNativeMenuHostDestroy(); - WidgetGtk::OnDestroy(object); + NativeWidgetGtk::OnDestroy(object); } void MenuHostGtk::HandleXGrabBroke() { @@ -114,7 +114,7 @@ void MenuHostGtk::HandleXGrabBroke() { did_input_grab_ = false; delegate_->OnNativeMenuHostCancelCapture(); } - WidgetGtk::HandleXGrabBroke(); + NativeWidgetGtk::HandleXGrabBroke(); } void MenuHostGtk::HandleGtkGrabBroke() { @@ -123,7 +123,7 @@ void MenuHostGtk::HandleGtkGrabBroke() { ReleaseMouseCapture(); delegate_->OnNativeMenuHostCancelCapture(); } - WidgetGtk::HandleGtkGrabBroke(); + NativeWidgetGtk::HandleGtkGrabBroke(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/views/controls/menu/menu_host_gtk.h b/views/controls/menu/menu_host_gtk.h index ac1e588..e49064e 100644 --- a/views/controls/menu/menu_host_gtk.h +++ b/views/controls/menu/menu_host_gtk.h @@ -8,7 +8,7 @@ #pragma once #include "views/controls/menu/native_menu_host.h" -#include "views/widget/widget_gtk.h" +#include "views/widget/native_widget_gtk.h" namespace views { namespace internal { @@ -16,7 +16,7 @@ class NativeMenuHostDelegate; } // NativeMenuHost implementation for Gtk. -class MenuHostGtk : public WidgetGtk, +class MenuHostGtk : public NativeWidgetGtk, public NativeMenuHost { public: explicit MenuHostGtk(internal::NativeMenuHostDelegate* delegate); @@ -27,7 +27,7 @@ class MenuHostGtk : public WidgetGtk, virtual void StartCapturing() OVERRIDE; virtual NativeWidget* AsNativeWidget() OVERRIDE; - // Overridden from WidgetGtk: + // Overridden from NativeWidgetGtk: virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; virtual void ReleaseMouseCapture() OVERRIDE; virtual void OnDestroy(GtkWidget* object) OVERRIDE; diff --git a/views/controls/menu/menu_host_win.cc b/views/controls/menu/menu_host_win.cc index cba5595..7e01134 100644 --- a/views/controls/menu/menu_host_win.cc +++ b/views/controls/menu/menu_host_win.cc @@ -12,7 +12,7 @@ namespace views { // MenuHostWin, public: MenuHostWin::MenuHostWin(internal::NativeMenuHostDelegate* delegate) - : WidgetWin(delegate->AsNativeWidgetDelegate()), + : NativeWidgetWin(delegate->AsNativeWidgetDelegate()), delegate_(delegate) { } @@ -31,16 +31,16 @@ NativeWidget* MenuHostWin::AsNativeWidget() { } //////////////////////////////////////////////////////////////////////////////// -// MenuHostWin, WidgetWin overrides: +// MenuHostWin, NativeWidgetWin overrides: void MenuHostWin::OnDestroy() { delegate_->OnNativeMenuHostDestroy(); - WidgetWin::OnDestroy(); + NativeWidgetWin::OnDestroy(); } void MenuHostWin::OnCancelMode() { delegate_->OnNativeMenuHostCancelCapture(); - WidgetWin::OnCancelMode(); + NativeWidgetWin::OnCancelMode(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/views/controls/menu/menu_host_win.h b/views/controls/menu/menu_host_win.h index 7dfc8e8..9c9f8f8 100644 --- a/views/controls/menu/menu_host_win.h +++ b/views/controls/menu/menu_host_win.h @@ -7,7 +7,7 @@ #pragma once #include "views/controls/menu/native_menu_host.h" -#include "views/widget/widget_win.h" +#include "views/widget/native_widget_win.h" namespace views { namespace internal { @@ -15,7 +15,7 @@ class NativeMenuHostDelegate; } // MenuHost implementation for windows. -class MenuHostWin : public WidgetWin, +class MenuHostWin : public NativeWidgetWin, public NativeMenuHost { public: explicit MenuHostWin(internal::NativeMenuHostDelegate* delegate); @@ -26,7 +26,7 @@ class MenuHostWin : public WidgetWin, virtual void StartCapturing() OVERRIDE; virtual NativeWidget* AsNativeWidget() OVERRIDE; - // Overridden from WidgetWin: + // Overridden from NativeWidgetWin: virtual void OnDestroy() OVERRIDE; virtual void OnCancelMode() OVERRIDE; diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc index b04d3bc9..b9db871 100644 --- a/views/controls/menu/native_menu_gtk.cc +++ b/views/controls/menu/native_menu_gtk.cc @@ -22,7 +22,7 @@ #include "views/controls/menu/menu_2.h" #include "views/controls/menu/nested_dispatcher_gtk.h" #include "views/views_delegate.h" -#include "views/widget/widget_gtk.h" +#include "views/widget/native_widget_gtk.h" namespace { @@ -108,8 +108,8 @@ void NativeMenuGtk::RunMenuAt(const gfx::Point& point, int alignment) { // the menu after the menu painted itself. GtkWidget* popup_window = gtk_widget_get_ancestor(menu_, GTK_TYPE_WINDOW); CHECK(popup_window); - WidgetGtk::UpdateFreezeUpdatesProperty(GTK_WINDOW(popup_window), - true /* add */); + NativeWidgetGtk::UpdateFreezeUpdatesProperty(GTK_WINDOW(popup_window), + true /* add */); expose_handler_id_ = g_signal_connect_after(G_OBJECT(menu_), "expose_event", G_CALLBACK(&OnExposeThunk), this); @@ -346,8 +346,8 @@ gboolean NativeMenuGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) { GtkWidget* popup_window = gtk_widget_get_ancestor(menu_, GTK_TYPE_WINDOW); CHECK(popup_window); DCHECK(expose_handler_id_); - WidgetGtk::UpdateFreezeUpdatesProperty(GTK_WINDOW(popup_window), - false /* remove */); + NativeWidgetGtk::UpdateFreezeUpdatesProperty(GTK_WINDOW(popup_window), + false /* remove */); if (expose_handler_id_) { g_signal_handler_disconnect(menu_, expose_handler_id_); expose_handler_id_ = 0; diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc index 6a00743..42321e5 100644 --- a/views/controls/native/native_view_host.cc +++ b/views/controls/native/native_view_host.cc @@ -129,8 +129,8 @@ void NativeViewHost::Layout() { void NativeViewHost::OnPaint(gfx::Canvas* canvas) { // Paint background if there is one. NativeViewHost needs to paint // a background when it is hosted in a TabbedPane. For Gtk implementation, - // NativeTabbedPaneGtk uses a WidgetGtk as page container and because - // WidgetGtk hook "expose" with its root view's paint, we need to + // NativeTabbedPaneGtk uses a NativeWidgetGtk as page container and because + // NativeWidgetGtk hook "expose" with its root view's paint, we need to // fill the content. Otherwise, the tab page's background is not properly // cleared. For Windows case, it appears okay to not paint background because // we don't have a container window in-between. However if you want to use diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc index 2bc0e50..fedbc416 100644 --- a/views/controls/native/native_view_host_gtk.cc +++ b/views/controls/native/native_view_host_gtk.cc @@ -11,7 +11,7 @@ #include "views/controls/native/native_view_host.h" #include "views/focus/focus_manager.h" #include "views/widget/gtk_views_fixed.h" -#include "views/widget/widget_gtk.h" +#include "views/widget/native_widget_gtk.h" namespace views { @@ -112,7 +112,7 @@ void NativeViewHostGtk::NativeViewAttached() { gtk_container_add(GTK_CONTAINER(fixed_), host_->native_view()); // Let the widget know that the native component has been painted. - views::WidgetGtk::RegisterChildExposeHandler(host_->native_view()); + views::NativeWidgetGtk::RegisterChildExposeHandler(host_->native_view()); if (!destroy_signal_id_) { destroy_signal_id_ = g_signal_connect(host_->native_view(), @@ -214,7 +214,7 @@ void NativeViewHostGtk::UninstallClip() { } void NativeViewHostGtk::ShowWidget(int x, int y, int w, int h) { - // x and y are the desired position of host_ in WidgetGtk coordinates. + // x and y are the desired position of host_ in NativeWidgetGtk coordinates. int fixed_x = x; int fixed_y = y; int fixed_w = w; @@ -286,7 +286,7 @@ void NativeViewHostGtk::CreateFixed(bool needs_window) { // Defeat refcounting. We need to own the fixed. gtk_widget_ref(fixed_); - WidgetGtk* widget_gtk = GetHostWidget(); + NativeWidgetGtk* widget_gtk = GetHostWidget(); if (widget_gtk) widget_gtk->AddChild(fixed_); @@ -322,14 +322,14 @@ void NativeViewHostGtk::DestroyFixed() { fixed_ = NULL; } -WidgetGtk* NativeViewHostGtk::GetHostWidget() const { - return static_cast<WidgetGtk*>(host_->GetWidget()->native_widget()); +NativeWidgetGtk* NativeViewHostGtk::GetHostWidget() const { + return static_cast<NativeWidgetGtk*>(host_->GetWidget()->native_widget()); } GtkWidget* NativeViewHostGtk::GetFocusedDescendant() { if (!fixed_) return NULL; - WidgetGtk* host = GetHostWidget(); + NativeWidgetGtk* host = GetHostWidget(); if (!host) return NULL; GtkWidget* top_level = gtk_widget_get_toplevel(host->GetNativeView()); diff --git a/views/controls/native/native_view_host_gtk.h b/views/controls/native/native_view_host_gtk.h index 17ccd7e..eb98349 100644 --- a/views/controls/native/native_view_host_gtk.h +++ b/views/controls/native/native_view_host_gtk.h @@ -16,7 +16,7 @@ namespace views { class View; -class WidgetGtk; +class NativeWidgetGtk; // Note that the NativeViewHostGtk assumes ownership of the GtkWidget attached // to it for the duration of its attachment. This is so the NativeViewHostGtk @@ -50,7 +50,7 @@ class NativeViewHostGtk : public NativeViewHostWrapper { // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. void DestroyFixed(); - WidgetGtk* GetHostWidget() const; + NativeWidgetGtk* GetHostWidget() const; // Returns the descendant of fixed_ that has focus, or NULL if focus is not // on a descendant of fixed_. diff --git a/views/controls/native_control_win.cc b/views/controls/native_control_win.cc index 76bc5aa..cd1ac0b 100644 --- a/views/controls/native_control_win.cc +++ b/views/controls/native_control_win.cc @@ -134,8 +134,8 @@ void NativeControlWin::ShowContextMenu(const gfx::Point& location) { } void NativeControlWin::NativeControlCreated(HWND native_control) { - // Associate this object with the control's HWND so that WidgetWin can find - // this object when it receives messages from it. + // Associate this object with the control's HWND so that NativeWidgetWin can + // find this object when it receives messages from it. props_.push_back(new ViewProp(native_control, kNativeControlWinKey, this)); props_.push_back(ChildWindowMessageProcessor::Register(native_control, this)); diff --git a/views/controls/native_control_win.h b/views/controls/native_control_win.h index 8b446b5..5d7e949 100644 --- a/views/controls/native_control_win.h +++ b/views/controls/native_control_win.h @@ -44,7 +44,7 @@ class NativeControlWin : public ChildWindowMessageProcessor, virtual void VisibilityChanged(View* starting_from, bool is_visible); virtual void OnFocus(); - // Called by the containing WidgetWin when a WM_CONTEXTMENU message is + // Called by the containing NativeWidgetWin when a WM_CONTEXTMENU message is // received from the HWND created by an object derived from NativeControlWin. virtual void ShowContextMenu(const gfx::Point& location); @@ -75,9 +75,9 @@ class NativeControlWin : public ChildWindowMessageProcessor, private: typedef ScopedVector<ui::ViewProp> ViewProps; - // Called by the containing WidgetWin when a message of type WM_CTLCOLORBTN or - // WM_CTLCOLORSTATIC is sent from the HWND created by an object dreived from - // NativeControlWin. + // Called by the containing NativeWidgetWin when a message of type + // WM_CTLCOLORBTN or WM_CTLCOLORSTATIC is sent from the HWND created by an + // object derived from NativeControlWin. LRESULT GetControlColor(UINT message, HDC dc, HWND sender); // Our subclass window procedure for the attached control. diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc index 2fbdbe9..c35e862 100644 --- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc +++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc @@ -16,8 +16,9 @@ #include "views/controls/tabbed_pane/tabbed_pane.h" #include "views/controls/tabbed_pane/tabbed_pane_listener.h" #include "views/layout/fill_layout.h" +#include "views/widget/native_widget.h" #include "views/widget/root_view.h" -#include "views/widget/widget_gtk.h" +#include "views/widget/widget.h" namespace views { diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.h b/views/controls/tabbed_pane/native_tabbed_pane_gtk.h index bbe412d..60d76cc 100644 --- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.h +++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.h @@ -13,8 +13,6 @@ namespace views { -class WidgetGtk; - class NativeTabbedPaneGtk : public NativeControlGtk, public NativeTabbedPaneWrapper { public: diff --git a/views/controls/textfield/native_textfield_gtk.cc b/views/controls/textfield/native_textfield_gtk.cc index 30444bb..2fe5c60 100644 --- a/views/controls/textfield/native_textfield_gtk.cc +++ b/views/controls/textfield/native_textfield_gtk.cc @@ -18,7 +18,7 @@ #include "views/controls/textfield/native_textfield_views.h" #include "views/controls/textfield/textfield.h" #include "views/controls/textfield/textfield_controller.h" -#include "views/widget/widget_gtk.h" +#include "views/widget/native_widget_gtk.h" namespace views { @@ -393,7 +393,8 @@ void NativeTextfieldGtk::OnActivate(GtkWidget* native_widget) { if (controller) handled = controller->HandleKeyEvent(textfield_, views_key_event); - WidgetGtk* widget = static_cast<WidgetGtk*>(GetWidget()->native_widget()); + NativeWidgetGtk* widget = + static_cast<NativeWidgetGtk*>(GetWidget()->native_widget()); if (!handled && widget) handled = widget->HandleKeyboardEvent(views_key_event); |