Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: chrome/browser/gtk/bookmark_menu_controller_gtk.cc

Issue 115831: Converts a bunch things from NativeWindow to NativeView to make it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/bookmark_editor_gtk.cc ('k') | chrome/browser/input_window_dialog.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/bookmark_menu_controller_gtk.h" 5 #include "chrome/browser/gtk/bookmark_menu_controller_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/gfx/gtk_util.h" 9 #include "app/gfx/gtk_util.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 GdkEventButton* event, 143 GdkEventButton* event,
144 BookmarkMenuController* controller) { 144 BookmarkMenuController* controller) {
145 if (event->button == 3) { 145 if (event->button == 3) {
146 // Show the right click menu and stop processing this button event. 146 // Show the right click menu and stop processing this button event.
147 BookmarkNode* node = GetNodeFromMenuItem(sender); 147 BookmarkNode* node = GetNodeFromMenuItem(sender);
148 BookmarkNode* parent = node->GetParent(); 148 BookmarkNode* parent = node->GetParent();
149 std::vector<BookmarkNode*> nodes; 149 std::vector<BookmarkNode*> nodes;
150 nodes.push_back(node); 150 nodes.push_back(node);
151 controller->context_menu_.reset( 151 controller->context_menu_.reset(
152 new BookmarkContextMenu( 152 new BookmarkContextMenu(
153 GTK_WINDOW(gtk_widget_get_toplevel(sender)), 153 sender, controller->profile_, controller->browser_,
154 controller->profile_, controller->browser_,
155 controller->page_navigator_, parent, nodes, 154 controller->page_navigator_, parent, nodes,
156 BookmarkContextMenu::BOOKMARK_BAR)); 155 BookmarkContextMenu::BOOKMARK_BAR));
157 controller->context_menu_->PopupAsContext(event->time); 156 controller->context_menu_->PopupAsContext(event->time);
158 return TRUE; 157 return TRUE;
159 } 158 }
160 159
161 return FALSE; 160 return FALSE;
162 } 161 }
163 162
164 gboolean BookmarkMenuController::OnButtonReleased( 163 gboolean BookmarkMenuController::OnButtonReleased(
(...skipping 16 matching lines...) Expand all
181 return TRUE; 180 return TRUE;
182 } 181 }
183 182
184 return FALSE; 183 return FALSE;
185 } 184 }
186 185
187 void BookmarkMenuController::OnMenuItemActivated( 186 void BookmarkMenuController::OnMenuItemActivated(
188 GtkMenuItem* menu_item, BookmarkMenuController* controller) { 187 GtkMenuItem* menu_item, BookmarkMenuController* controller) {
189 controller->NavigateToMenuItem(GTK_WIDGET(menu_item), CURRENT_TAB); 188 controller->NavigateToMenuItem(GTK_WIDGET(menu_item), CURRENT_TAB);
190 } 189 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/bookmark_editor_gtk.cc ('k') | chrome/browser/input_window_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698