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

Side by Side Diff: chrome/browser/views/bookmark_context_menu.cc

Issue 328012: Makes it so that when a folder is open on the bookmark bar and the... (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 unified diff | Download patch | Annotate | Revision Log
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/views/bookmark_context_menu.h" 5 #include "chrome/browser/views/bookmark_context_menu.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/profile.h" 8 #include "chrome/browser/profile.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "views/controls/menu/menu_item_view.h" 10 #include "views/controls/menu/menu_item_view.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 BookmarkContextMenu::~BookmarkContextMenu() { 32 BookmarkContextMenu::~BookmarkContextMenu() {
33 } 33 }
34 34
35 void BookmarkContextMenu::RunMenuAt(const gfx::Point& point) { 35 void BookmarkContextMenu::RunMenuAt(const gfx::Point& point) {
36 // width/height don't matter here. 36 // width/height don't matter here.
37 views::MenuItemView::AnchorPosition anchor = 37 views::MenuItemView::AnchorPosition anchor =
38 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ? 38 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
39 views::MenuItemView::TOPRIGHT : views::MenuItemView::TOPLEFT; 39 views::MenuItemView::TOPRIGHT : views::MenuItemView::TOPLEFT;
40 menu_->RunMenuAt(parent_window_, gfx::Rect(point.x(), point.y(), 0, 0), 40 menu_->RunMenuAt(parent_window_, NULL, gfx::Rect(point.x(), point.y(), 0, 0),
41 anchor, true); 41 anchor, true);
42 } 42 }
43 43
44 //////////////////////////////////////////////////////////////////////////////// 44 ////////////////////////////////////////////////////////////////////////////////
45 // BookmarkContextMenu, views::MenuDelegate implementation: 45 // BookmarkContextMenu, views::MenuDelegate implementation:
46 46
47 void BookmarkContextMenu::ExecuteCommand(int command_id) { 47 void BookmarkContextMenu::ExecuteCommand(int command_id) {
48 controller_->ExecuteCommand(command_id); 48 controller_->ExecuteCommand(command_id);
49 } 49 }
50 50
(...skipping 21 matching lines...) Expand all
72 } 72 }
73 73
74 void BookmarkContextMenu::AddSeparator() { 74 void BookmarkContextMenu::AddSeparator() {
75 menu_->AppendSeparator(); 75 menu_->AppendSeparator();
76 } 76 }
77 77
78 void BookmarkContextMenu::AddCheckboxItem(int command_id) { 78 void BookmarkContextMenu::AddCheckboxItem(int command_id) {
79 menu_->AppendMenuItem(command_id, l10n_util::GetString(command_id), 79 menu_->AppendMenuItem(command_id, l10n_util::GetString(command_id),
80 views::MenuItemView::CHECKBOX); 80 views::MenuItemView::CHECKBOX);
81 } 81 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view_test.cc ('k') | chrome/browser/views/bookmark_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698