diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 19:22:26 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 19:22:26 +0000 |
commit | d6d6d586d2a91d13d06a8bce53a2d03f2458f9c2 (patch) | |
tree | f662039f70110c555ec6fb096b389b73af31af2d /chrome/browser/gtk | |
parent | 7587ee0fa4399ed0485559559b0ee9228daf0337 (diff) | |
download | chromium_src-d6d6d586d2a91d13d06a8bce53a2d03f2458f9c2.zip chromium_src-d6d6d586d2a91d13d06a8bce53a2d03f2458f9c2.tar.gz chromium_src-d6d6d586d2a91d13d06a8bce53a2d03f2458f9c2.tar.bz2 |
Converts some uses of native_view to native_window. This is necessitated
by wanting to parent bookmarkeditor to browserwindow, which returns a
native_window.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/270067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_bubble_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_context_menu_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_context_menu_gtk.h | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_editor_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_manager_gtk.cc | 9 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_menu_controller_gtk.cc | 2 |
7 files changed, 19 insertions, 16 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index 17f7383..9bcbb80 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -754,8 +754,9 @@ void BookmarkBarGtk::PopupMenuForNode(GtkWidget* sender, nodes.push_back(parent); } + GtkWindow* window = GTK_WINDOW(gtk_widget_get_toplevel(sender)); current_context_menu_.reset(new BookmarkContextMenuGtk( - sender, profile_, browser_, page_navigator_, + window, profile_, browser_, page_navigator_, parent, nodes, BookmarkContextMenuGtk::BOOKMARK_BAR, NULL)); current_context_menu_->PopupAsContext(event->time); @@ -791,8 +792,9 @@ void BookmarkBarGtk::OnClicked(GtkWidget* sender, event_utils::DispositionFromEventFlags(event->state), PageTransition::AUTO_BOOKMARK); } else { + GtkWindow* window = GTK_WINDOW(gtk_widget_get_toplevel(sender)); bookmark_utils::OpenAll( - sender, bar->profile_, bar->page_navigator_, node, + window, bar->profile_, bar->page_navigator_, node, event_utils::DispositionFromEventFlags(event->state)); } diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.cc b/chrome/browser/gtk/bookmark_bubble_gtk.cc index 3c71a9c..c43a7a0 100644 --- a/chrome/browser/gtk/bookmark_bubble_gtk.cc +++ b/chrome/browser/gtk/bookmark_bubble_gtk.cc @@ -363,7 +363,7 @@ void BookmarkBubbleGtk::ShowEditor() { // Closing might delete us, so we'll cache what we want we need on the stack. Profile* profile = profile_; - GtkWidget* toplevel = GTK_WIDGET(toplevel_window_); + GtkWindow* toplevel = toplevel_window_; // Close the bubble, deleting the C++ objects, etc. bubble_->Close(); diff --git a/chrome/browser/gtk/bookmark_context_menu_gtk.cc b/chrome/browser/gtk/bookmark_context_menu_gtk.cc index 8eb032d..9c3f03c 100644 --- a/chrome/browser/gtk/bookmark_context_menu_gtk.cc +++ b/chrome/browser/gtk/bookmark_context_menu_gtk.cc @@ -51,7 +51,7 @@ class EditFolderController : public InputWindowDialog::Delegate, } static void Show(Profile* profile, - gfx::NativeView wnd, + gfx::NativeWindow wnd, const BookmarkNode* node, bool is_new, bool show_in_manager) { @@ -63,7 +63,7 @@ class EditFolderController : public InputWindowDialog::Delegate, private: EditFolderController(Profile* profile, - gfx::NativeView wnd, + gfx::NativeWindow wnd, const BookmarkNode* node, bool is_new, bool show_in_manager) @@ -198,7 +198,7 @@ class SelectOnCreationHandler : public BookmarkEditor::Handler { // BookmarkContextMenuGtk ------------------------------------------- BookmarkContextMenuGtk::BookmarkContextMenuGtk( - gfx::NativeView wnd, + gfx::NativeWindow wnd, Profile* profile, Browser* browser, PageNavigator* navigator, diff --git a/chrome/browser/gtk/bookmark_context_menu_gtk.h b/chrome/browser/gtk/bookmark_context_menu_gtk.h index efe684d..3680c65 100644 --- a/chrome/browser/gtk/bookmark_context_menu_gtk.h +++ b/chrome/browser/gtk/bookmark_context_menu_gtk.h @@ -50,7 +50,7 @@ class BookmarkContextMenuGtk : public BookmarkModelObserver, // |parent| is the parent for newly created nodes if |selection| is empty. // |selection| is the nodes the context menu operates on and may be empty. // |configuration| determines which items to show. - BookmarkContextMenuGtk(gfx::NativeView hwnd, + BookmarkContextMenuGtk(gfx::NativeWindow hwnd, Profile* profile, Browser* browser, PageNavigator* navigator, @@ -124,7 +124,7 @@ class BookmarkContextMenuGtk : public BookmarkModelObserver, // parent_ is returned. const BookmarkNode* GetParentForNewNodes() const; - gfx::NativeView wnd_; + gfx::NativeWindow wnd_; Profile* profile_; Browser* browser_; PageNavigator* navigator_; diff --git a/chrome/browser/gtk/bookmark_editor_gtk.cc b/chrome/browser/gtk/bookmark_editor_gtk.cc index 17bd8d1..7b08648 100644 --- a/chrome/browser/gtk/bookmark_editor_gtk.cc +++ b/chrome/browser/gtk/bookmark_editor_gtk.cc @@ -37,7 +37,7 @@ static const int kTreeHeight = 150; } // namespace // static -void BookmarkEditor::Show(gfx::NativeView parent_hwnd, +void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, Profile* profile, const BookmarkNode* parent, const BookmarkNode* node, @@ -45,8 +45,8 @@ void BookmarkEditor::Show(gfx::NativeView parent_hwnd, Handler* handler) { DCHECK(profile); BookmarkEditorGtk* editor = - new BookmarkEditorGtk(GTK_WINDOW(gtk_widget_get_toplevel(parent_hwnd)), - profile, parent, node, configuration, handler); + new BookmarkEditorGtk(parent_hwnd, profile, parent, node, configuration, + handler); editor->Show(); } diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc index 6277690..0ffb725 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.cc +++ b/chrome/browser/gtk/bookmark_manager_gtk.cc @@ -606,9 +606,9 @@ void BookmarkManagerGtk::ResetOrganizeMenu(bool left) { if (old_menu) MessageLoop::current()->DeleteSoon(FROM_HERE, old_menu); - organize_menu_.reset(new BookmarkContextMenuGtk(window_, profile_, NULL, NULL, - parent, nodes, BookmarkContextMenuGtk::BOOKMARK_MANAGER_ORGANIZE_MENU, - NULL)); + organize_menu_.reset(new BookmarkContextMenuGtk(GTK_WINDOW(window_), profile_, + NULL, NULL, parent, nodes, + BookmarkContextMenuGtk::BOOKMARK_MANAGER_ORGANIZE_MENU, NULL)); gtk_menu_item_set_submenu(GTK_MENU_ITEM(organize_), organize_menu_->menu()); } @@ -1130,7 +1130,8 @@ void BookmarkManagerGtk::OnRightTreeViewRowActivated( bm->SelectInTree(nodes[0], false); return; } - bookmark_utils::OpenAll(bm->window_, bm->profile_, NULL, nodes, CURRENT_TAB); + bookmark_utils::OpenAll(GTK_WINDOW(bm->window_), bm->profile_, NULL, nodes, + CURRENT_TAB); } // static diff --git a/chrome/browser/gtk/bookmark_menu_controller_gtk.cc b/chrome/browser/gtk/bookmark_menu_controller_gtk.cc index ed436a7..b835dcc 100644 --- a/chrome/browser/gtk/bookmark_menu_controller_gtk.cc +++ b/chrome/browser/gtk/bookmark_menu_controller_gtk.cc @@ -251,7 +251,7 @@ gboolean BookmarkMenuController::OnButtonPressed( nodes.push_back(node); controller->context_menu_.reset( new BookmarkContextMenuGtk( - GTK_WIDGET(controller->parent_window_), controller->profile_, + controller->parent_window_, controller->profile_, controller->browser_, controller->page_navigator_, parent, nodes, BookmarkContextMenuGtk::BOOKMARK_BAR, controller)); |