OLD | NEW |
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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/prefs/public/pref_service_base.h" | 8 #include "base/prefs/public/pref_service_base.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/bookmarks/bookmark_editor.h" | 10 #include "chrome/browser/bookmarks/bookmark_editor.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) { | 124 } else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) { |
125 initial_disposition = NEW_WINDOW; | 125 initial_disposition = NEW_WINDOW; |
126 content::RecordAction( | 126 content::RecordAction( |
127 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow")); | 127 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow")); |
128 } else { | 128 } else { |
129 initial_disposition = OFF_THE_RECORD; | 129 initial_disposition = OFF_THE_RECORD; |
130 content::RecordAction( | 130 content::RecordAction( |
131 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito")); | 131 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito")); |
132 } | 132 } |
133 chrome::OpenAll(parent_window_, navigator_, selection_, | 133 chrome::OpenAll(parent_window_, navigator_, selection_, |
134 initial_disposition); | 134 initial_disposition, profile_); |
135 break; | 135 break; |
136 } | 136 } |
137 | 137 |
138 case IDC_BOOKMARK_BAR_RENAME_FOLDER: | 138 case IDC_BOOKMARK_BAR_RENAME_FOLDER: |
139 case IDC_BOOKMARK_BAR_EDIT: | 139 case IDC_BOOKMARK_BAR_EDIT: |
140 content::RecordAction( | 140 content::RecordAction( |
141 UserMetricsAction("BookmarkBar_ContextMenu_Edit")); | 141 UserMetricsAction("BookmarkBar_ContextMenu_Edit")); |
142 | 142 |
143 if (selection_.size() != 1) { | 143 if (selection_.size() != 1) { |
144 NOTREACHED(); | 144 NOTREACHED(); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 bool BookmarkContextMenuController::GetAcceleratorForCommandId( | 308 bool BookmarkContextMenuController::GetAcceleratorForCommandId( |
309 int command_id, | 309 int command_id, |
310 ui::Accelerator* accelerator) { | 310 ui::Accelerator* accelerator) { |
311 return false; | 311 return false; |
312 } | 312 } |
313 | 313 |
314 void BookmarkContextMenuController::BookmarkModelChanged() { | 314 void BookmarkContextMenuController::BookmarkModelChanged() { |
315 if (delegate_) | 315 if (delegate_) |
316 delegate_->CloseMenu(); | 316 delegate_->CloseMenu(); |
317 } | 317 } |
OLD | NEW |