| 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/views/bookmarks/bookmark_context_menu_controller_vie
ws.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_vie
ws.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) { | 62 } else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) { |
| 63 initial_disposition = NEW_WINDOW; | 63 initial_disposition = NEW_WINDOW; |
| 64 content::RecordAction( | 64 content::RecordAction( |
| 65 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow")); | 65 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow")); |
| 66 } else { | 66 } else { |
| 67 initial_disposition = OFF_THE_RECORD; | 67 initial_disposition = OFF_THE_RECORD; |
| 68 content::RecordAction( | 68 content::RecordAction( |
| 69 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito")); | 69 UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito")); |
| 70 } | 70 } |
| 71 chrome::OpenAll(parent_widget_->GetNativeWindow(), navigator_, | 71 chrome::OpenAll(parent_widget_->GetNativeWindow(), navigator_, |
| 72 selection_, initial_disposition); | 72 selection_, initial_disposition, profile_); |
| 73 bookmark_utils::RecordBookmarkLaunch(bookmark_utils::LAUNCH_CONTEXT_MENU); | 73 bookmark_utils::RecordBookmarkLaunch(bookmark_utils::LAUNCH_CONTEXT_MENU); |
| 74 break; | 74 break; |
| 75 } | 75 } |
| 76 | 76 |
| 77 case IDC_BOOKMARK_BAR_RENAME_FOLDER: | 77 case IDC_BOOKMARK_BAR_RENAME_FOLDER: |
| 78 case IDC_BOOKMARK_BAR_EDIT: | 78 case IDC_BOOKMARK_BAR_EDIT: |
| 79 content::RecordAction( | 79 content::RecordAction( |
| 80 UserMetricsAction("BookmarkBar_ContextMenu_Edit")); | 80 UserMetricsAction("BookmarkBar_ContextMenu_Edit")); |
| 81 | 81 |
| 82 if (selection_.size() != 1) { | 82 if (selection_.size() != 1) { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 void BookmarkContextMenuControllerViews::BookmarkModelChanged() { | 313 void BookmarkContextMenuControllerViews::BookmarkModelChanged() { |
| 314 delegate_->CloseMenu(); | 314 delegate_->CloseMenu(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 BookmarkModel* BookmarkContextMenuControllerViews::RemoveModelObserver() { | 317 BookmarkModel* BookmarkContextMenuControllerViews::RemoveModelObserver() { |
| 318 BookmarkModel* model = model_; | 318 BookmarkModel* model = model_; |
| 319 model_->RemoveObserver(this); | 319 model_->RemoveObserver(this); |
| 320 model_ = NULL; | 320 model_ = NULL; |
| 321 return model; | 321 return model; |
| 322 } | 322 } |
| OLD | NEW |