From 4a9fb4ff363eb5fb398953fa4ed15124f228c124 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Mon, 16 Mar 2009 21:03:01 +0000 Subject: Change a function name. GetTopLevelNativeView changed to GetTopLevelNativeWindow since it returns a NativeWindow rather than a NativeView. NativeWindows are inherently top level, so the new name is a little redundant, but I think it is clearer than GetNativeWindow since "window" can have different definitions on different platforms. Review URL: http://codereview.chromium.org/42244 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11777 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/web_contents.cc | 2 +- chrome/browser/tab_contents/web_contents_view.h | 2 +- chrome/browser/tab_contents/web_contents_view_gtk.cc | 4 ++-- chrome/browser/tab_contents/web_contents_view_gtk.h | 2 +- chrome/browser/tab_contents/web_contents_view_mac.h | 2 +- chrome/browser/tab_contents/web_contents_view_mac.mm | 2 +- chrome/browser/tab_contents/web_contents_view_win.cc | 2 +- chrome/browser/tab_contents/web_contents_view_win.h | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index 1e50600..6870066 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -1070,7 +1070,7 @@ void WebContents::RunFileChooser(bool multiple_files, SelectFileDialog::SELECT_OPEN_FILE; select_file_dialog_->SelectFile(dialog_type, title, default_file, filter, std::wstring(), - view_->GetTopLevelNativeView(), NULL); + view_->GetTopLevelNativeWindow(), NULL); } void WebContents::RunJavaScriptMessage( diff --git a/chrome/browser/tab_contents/web_contents_view.h b/chrome/browser/tab_contents/web_contents_view.h index f63a3ee..2e61681 100644 --- a/chrome/browser/tab_contents/web_contents_view.h +++ b/chrome/browser/tab_contents/web_contents_view.h @@ -61,7 +61,7 @@ class WebContentsView : public RenderViewHostDelegate::View { // Returns the outermost native view. This will be used as the parent for // dialog boxes. - virtual gfx::NativeWindow GetTopLevelNativeView() const = 0; + virtual gfx::NativeWindow GetTopLevelNativeWindow() const = 0; // Computes the rectangle for the native widget that contains the contents of // the tab relative to its parent. diff --git a/chrome/browser/tab_contents/web_contents_view_gtk.cc b/chrome/browser/tab_contents/web_contents_view_gtk.cc index 94a1282..8bfde32 100644 --- a/chrome/browser/tab_contents/web_contents_view_gtk.cc +++ b/chrome/browser/tab_contents/web_contents_view_gtk.cc @@ -96,7 +96,7 @@ gfx::NativeView WebContentsViewGtk::GetContentNativeView() const { return NULL; } -gfx::NativeWindow WebContentsViewGtk::GetTopLevelNativeView() const { +gfx::NativeWindow WebContentsViewGtk::GetTopLevelNativeWindow() const { return GTK_WINDOW(gtk_widget_get_toplevel(vbox_.get())); } @@ -164,7 +164,7 @@ void WebContentsViewGtk::TakeFocus(bool reverse) { void WebContentsViewGtk::HandleKeyboardEvent( const NativeWebKeyboardEvent& event) { // This may be an accelerator. Pass it on to GTK. - GtkWindow* window = GetTopLevelNativeView(); + GtkWindow* window = GetTopLevelNativeWindow(); gtk_accel_groups_activate(G_OBJECT(window), event.os_event->keyval, GdkModifierType(event.os_event->state)); } diff --git a/chrome/browser/tab_contents/web_contents_view_gtk.h b/chrome/browser/tab_contents/web_contents_view_gtk.h index d389865..bf8822b 100644 --- a/chrome/browser/tab_contents/web_contents_view_gtk.h +++ b/chrome/browser/tab_contents/web_contents_view_gtk.h @@ -28,7 +28,7 @@ class WebContentsViewGtk : public WebContentsView { virtual gfx::NativeView GetNativeView() const; virtual gfx::NativeView GetContentNativeView() const; - virtual gfx::NativeWindow GetTopLevelNativeView() const; + virtual gfx::NativeWindow GetTopLevelNativeWindow() const; virtual void GetContainerBounds(gfx::Rect* out) const; virtual void OnContentsDestroy(); virtual void SetPageTitle(const std::wstring& title); diff --git a/chrome/browser/tab_contents/web_contents_view_mac.h b/chrome/browser/tab_contents/web_contents_view_mac.h index 352f5bc..ee21344 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.h +++ b/chrome/browser/tab_contents/web_contents_view_mac.h @@ -44,7 +44,7 @@ class WebContentsViewMac : public WebContentsView, RenderWidgetHost* render_widget_host); virtual gfx::NativeView GetNativeView() const; virtual gfx::NativeView GetContentNativeView() const; - virtual gfx::NativeWindow GetTopLevelNativeView() const; + virtual gfx::NativeWindow GetTopLevelNativeWindow() const; virtual void GetContainerBounds(gfx::Rect* out) const; virtual void OnContentsDestroy(); virtual void SetPageTitle(const std::wstring& title); diff --git a/chrome/browser/tab_contents/web_contents_view_mac.mm b/chrome/browser/tab_contents/web_contents_view_mac.mm index efde5a5..c5ddaf3 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.mm +++ b/chrome/browser/tab_contents/web_contents_view_mac.mm @@ -73,7 +73,7 @@ gfx::NativeView WebContentsViewMac::GetContentNativeView() const { return web_contents_->render_widget_host_view()->GetPluginNativeView(); } -gfx::NativeWindow WebContentsViewMac::GetTopLevelNativeView() const { +gfx::NativeWindow WebContentsViewMac::GetTopLevelNativeWindow() const { return [cocoa_view_.get() window]; } diff --git a/chrome/browser/tab_contents/web_contents_view_win.cc b/chrome/browser/tab_contents/web_contents_view_win.cc index f087a2c..1cb9d070 100644 --- a/chrome/browser/tab_contents/web_contents_view_win.cc +++ b/chrome/browser/tab_contents/web_contents_view_win.cc @@ -103,7 +103,7 @@ gfx::NativeView WebContentsViewWin::GetContentNativeView() const { return web_contents_->render_widget_host_view()->GetPluginNativeView(); } -gfx::NativeWindow WebContentsViewWin::GetTopLevelNativeView() const { +gfx::NativeWindow WebContentsViewWin::GetTopLevelNativeWindow() const { return ::GetAncestor(GetNativeView(), GA_ROOT); } diff --git a/chrome/browser/tab_contents/web_contents_view_win.h b/chrome/browser/tab_contents/web_contents_view_win.h index e4f9e45..1494ed9 100644 --- a/chrome/browser/tab_contents/web_contents_view_win.h +++ b/chrome/browser/tab_contents/web_contents_view_win.h @@ -34,7 +34,7 @@ class WebContentsViewWin : public WebContentsView, RenderWidgetHost* render_widget_host); virtual gfx::NativeView GetNativeView() const; virtual gfx::NativeView GetContentNativeView() const; - virtual gfx::NativeWindow GetTopLevelNativeView() const; + virtual gfx::NativeWindow GetTopLevelNativeWindow() const; virtual void GetContainerBounds(gfx::Rect* out) const; virtual void OnContentsDestroy(); virtual void SetPageTitle(const std::wstring& title); -- cgit v1.1