diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 21:03:01 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 21:03:01 +0000 |
commit | 4a9fb4ff363eb5fb398953fa4ed15124f228c124 (patch) | |
tree | a4e1262bb01ffe5b5ea0b9d6ef6c918444e40480 | |
parent | 4547e617576cefd5b3ad27e67c3c3acd7a6583f9 (diff) | |
download | chromium_src-4a9fb4ff363eb5fb398953fa4ed15124f228c124.zip chromium_src-4a9fb4ff363eb5fb398953fa4ed15124f228c124.tar.gz chromium_src-4a9fb4ff363eb5fb398953fa4ed15124f228c124.tar.bz2 |
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
8 files changed, 9 insertions, 9 deletions
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); |