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

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

Issue 10692164: Remove browser::FindTabbedBrowser call in bookmark_utils.cc. All callers, with the exception of met… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc » ('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/bookmarks/bookmark_context_menu_controller.h" 5 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/bookmarks/bookmark_editor.h" 9 #include "chrome/browser/bookmarks/bookmark_editor.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 UserMetricsAction("BookmarkBar_ContextMenu_OpenAll")); 121 UserMetricsAction("BookmarkBar_ContextMenu_OpenAll"));
122 } else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) { 122 } else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) {
123 initial_disposition = NEW_WINDOW; 123 initial_disposition = NEW_WINDOW;
124 content::RecordAction( 124 content::RecordAction(
125 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow")); 125 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow"));
126 } else { 126 } else {
127 initial_disposition = OFF_THE_RECORD; 127 initial_disposition = OFF_THE_RECORD;
128 content::RecordAction( 128 content::RecordAction(
129 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito")); 129 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito"));
130 } 130 }
131 bookmark_utils::OpenAll(parent_window_, profile_, navigator_, selection_, 131 bookmark_utils::OpenAll(parent_window_, navigator_, selection_,
132 initial_disposition); 132 initial_disposition);
133 break; 133 break;
134 } 134 }
135 135
136 case IDC_BOOKMARK_BAR_RENAME_FOLDER: 136 case IDC_BOOKMARK_BAR_RENAME_FOLDER:
137 case IDC_BOOKMARK_BAR_EDIT: 137 case IDC_BOOKMARK_BAR_EDIT:
138 content::RecordAction( 138 content::RecordAction(
139 UserMetricsAction("BookmarkBar_ContextMenu_Edit")); 139 UserMetricsAction("BookmarkBar_ContextMenu_Edit"));
140 140
141 if (selection_.size() != 1) { 141 if (selection_.size() != 1) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 delegate_->CloseMenu(); 318 delegate_->CloseMenu();
319 } 319 }
320 320
321 bool BookmarkContextMenuController::HasURLs() const { 321 bool BookmarkContextMenuController::HasURLs() const {
322 for (size_t i = 0; i < selection_.size(); ++i) { 322 for (size_t i = 0; i < selection_.size(); ++i) {
323 if (bookmark_utils::NodeHasURLs(selection_[i])) 323 if (bookmark_utils::NodeHasURLs(selection_[i]))
324 return true; 324 return true;
325 } 325 }
326 return false; 326 return false;
327 } 327 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698