OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controlle
r.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controlle
r.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h" | 10 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public BookmarkContextMenuControllerDelegate { | 21 public BookmarkContextMenuControllerDelegate { |
22 public: | 22 public: |
23 BookmarkContextMenuDelegateBridge( | 23 BookmarkContextMenuDelegateBridge( |
24 BookmarkContextMenuCocoaController* controller) | 24 BookmarkContextMenuCocoaController* controller) |
25 : controller_(controller) { | 25 : controller_(controller) { |
26 } | 26 } |
27 | 27 |
28 virtual ~BookmarkContextMenuDelegateBridge() { | 28 virtual ~BookmarkContextMenuDelegateBridge() { |
29 } | 29 } |
30 | 30 |
31 virtual void CloseMenu() OVERRIDE { | 31 virtual void CloseMenu() override { |
32 [controller_ cancelTracking]; | 32 [controller_ cancelTracking]; |
33 } | 33 } |
34 | 34 |
35 virtual void WillExecuteCommand( | 35 virtual void WillExecuteCommand( |
36 int command_id, | 36 int command_id, |
37 const std::vector<const BookmarkNode*>& bookmarks) OVERRIDE { | 37 const std::vector<const BookmarkNode*>& bookmarks) override { |
38 [controller_ willExecuteCommand:command_id]; | 38 [controller_ willExecuteCommand:command_id]; |
39 } | 39 } |
40 | 40 |
41 private: | 41 private: |
42 BookmarkContextMenuCocoaController* controller_; // Weak; owns us. | 42 BookmarkContextMenuCocoaController* controller_; // Weak; owns us. |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuDelegateBridge); | 44 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuDelegateBridge); |
45 }; | 45 }; |
46 | 46 |
47 @implementation BookmarkContextMenuCocoaController | 47 @implementation BookmarkContextMenuCocoaController |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 [bookmarkBarController_ closeFolderAndStopTrackingMenus]; | 128 [bookmarkBarController_ closeFolderAndStopTrackingMenus]; |
129 if (bookmarkNode_) | 129 if (bookmarkNode_) |
130 [bookmarkBarController_ unhighlightBookmark:bookmarkNode_]; | 130 [bookmarkBarController_ unhighlightBookmark:bookmarkNode_]; |
131 } | 131 } |
132 | 132 |
133 - (void)cancelTracking { | 133 - (void)cancelTracking { |
134 [[menuController_ menu] cancelTracking]; | 134 [[menuController_ menu] cancelTracking]; |
135 } | 135 } |
136 | 136 |
137 @end | 137 @end |
OLD | NEW |