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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc

Issue 1697223002: Remove HostDesktopType from c/b/ui/bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-21
Patch Set: #else and mac Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/bookmarks/bookmark_utils.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/bookmarks/bookmark_context_menu_controller.h" 5 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 AddItem(IDC_BOOKMARK_BAR_REDO, IDS_BOOKMARK_BAR_REDO); 104 AddItem(IDC_BOOKMARK_BAR_REDO, IDS_BOOKMARK_BAR_REDO);
105 } 105 }
106 106
107 AddSeparator(); 107 AddSeparator();
108 AddItem(IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK, IDS_BOOKMARK_BAR_ADD_NEW_BOOKMARK); 108 AddItem(IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK, IDS_BOOKMARK_BAR_ADD_NEW_BOOKMARK);
109 AddItem(IDC_BOOKMARK_BAR_NEW_FOLDER, IDS_BOOKMARK_BAR_NEW_FOLDER); 109 AddItem(IDC_BOOKMARK_BAR_NEW_FOLDER, IDS_BOOKMARK_BAR_NEW_FOLDER);
110 110
111 AddSeparator(); 111 AddSeparator();
112 AddItem(IDC_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER); 112 AddItem(IDC_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER);
113 // Use the native host desktop type in tests. 113 // Use the native host desktop type in tests.
114 if (chrome::IsAppsShortcutEnabled( 114 if (chrome::IsAppsShortcutEnabled(profile_)) {
115 profile_,
116 browser_ ? browser_->host_desktop_type()
117 : chrome::HOST_DESKTOP_TYPE_NATIVE)) {
118 AddCheckboxItem(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT, 115 AddCheckboxItem(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT,
119 IDS_BOOKMARK_BAR_SHOW_APPS_SHORTCUT); 116 IDS_BOOKMARK_BAR_SHOW_APPS_SHORTCUT);
120 } 117 }
121 AddCheckboxItem(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS, 118 AddCheckboxItem(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS,
122 IDS_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS_DEFAULT_NAME); 119 IDS_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS_DEFAULT_NAME);
123 AddCheckboxItem(IDC_BOOKMARK_BAR_ALWAYS_SHOW, IDS_SHOW_BOOKMARK_BAR); 120 AddCheckboxItem(IDC_BOOKMARK_BAR_ALWAYS_SHOW, IDS_SHOW_BOOKMARK_BAR);
124 } 121 }
125 122
126 void BookmarkContextMenuController::AddItem(int id, int localization_id) { 123 void BookmarkContextMenuController::AddItem(int id, int localization_id) {
127 menu_model_->AddItemWithStringId(id, localization_id); 124 menu_model_->AddItemWithStringId(id, localization_id);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 bool BookmarkContextMenuController::GetAcceleratorForCommandId( 435 bool BookmarkContextMenuController::GetAcceleratorForCommandId(
439 int command_id, 436 int command_id,
440 ui::Accelerator* accelerator) { 437 ui::Accelerator* accelerator) {
441 return false; 438 return false;
442 } 439 }
443 440
444 void BookmarkContextMenuController::BookmarkModelChanged() { 441 void BookmarkContextMenuController::BookmarkModelChanged() {
445 if (delegate_) 442 if (delegate_)
446 delegate_->CloseMenu(); 443 delegate_->CloseMenu();
447 } 444 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/bookmarks/bookmark_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698