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

Unified Diff: chrome/browser/views/bookmark_manager_view.cc

Issue 270067: Converts some uses of native_view to native_window. This is necessitated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/bookmark_manager_view.h ('k') | chrome/browser/views/bookmark_menu_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_manager_view.cc
===================================================================
--- chrome/browser/views/bookmark_manager_view.cc (revision 28706)
+++ chrome/browser/views/bookmark_manager_view.cc (working copy)
@@ -564,14 +564,12 @@
bool is_mouse_gesture) {
DCHECK(source == table_view_ || source == tree_view_);
bool is_table = (source == table_view_);
- ShowMenu(GetWidget()->GetNativeView(), x, y,
+ ShowMenu(x, y,
is_table ? BookmarkContextMenuController::BOOKMARK_MANAGER_TABLE :
BookmarkContextMenuController::BOOKMARK_MANAGER_TREE);
}
-void BookmarkManagerView::RunMenu(views::View* source,
- const gfx::Point& pt,
- HWND hwnd) {
+void BookmarkManagerView::RunMenu(views::View* source, const gfx::Point& pt) {
// TODO(glen): when you change the buttons around and what not, futz with
// this to make it look good. If you end up keeping padding numbers make them
// constants.
@@ -582,10 +580,10 @@
menu_x += UILayoutIsRightToLeft() ? (source->width() - 5) :
(-source->width() + 5);
if (source->GetID() == kOrganizeMenuButtonID) {
- ShowMenu(hwnd, menu_x, pt.y() + 2,
+ ShowMenu(menu_x, pt.y() + 2,
BookmarkContextMenuController::BOOKMARK_MANAGER_ORGANIZE_MENU);
} else if (source->GetID() == kToolsMenuButtonID) {
- ShowToolsMenu(hwnd, menu_x, pt.y() + 2);
+ ShowToolsMenu(menu_x, pt.y() + 2);
} else {
NOTREACHED();
}
@@ -732,10 +730,7 @@
}
void BookmarkManagerView::ShowMenu(
- HWND host,
- int x,
- int y,
- BookmarkContextMenuController::ConfigurationType config) {
+ int x, int y, BookmarkContextMenuController::ConfigurationType config) {
if (!GetBookmarkModel()->IsLoaded())
return;
@@ -753,7 +748,8 @@
BookmarkContextMenuController::BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER;
}
}
- BookmarkContextMenu menu(host, profile_, NULL, parent, nodes, config);
+ BookmarkContextMenu menu(GetWindow()->GetNativeWindow(), profile_, NULL, parent,
jcampan 2009/10/12 18:44:07 More than 80 chars
+ nodes, config);
menu.RunMenuAt(gfx::Point(x, y));
} else {
const BookmarkNode* node = GetSelectedFolder();
@@ -791,7 +787,7 @@
}
}
-void BookmarkManagerView::ShowToolsMenu(HWND host, int x, int y) {
+void BookmarkManagerView::ShowToolsMenu(int x, int y) {
views::MenuItemView menu(this);
menu.AppendMenuItemWithLabel(
IDS_BOOKMARK_MANAGER_IMPORT_MENU,
« no previous file with comments | « chrome/browser/views/bookmark_manager_view.h ('k') | chrome/browser/views/bookmark_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698