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 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 765 } |
766 | 766 |
767 - (BrowserActionsController*)browserActionsController { | 767 - (BrowserActionsController*)browserActionsController { |
768 return browserActionsController_.get(); | 768 return browserActionsController_.get(); |
769 } | 769 } |
770 | 770 |
771 - (NSView*)wrenchButton { | 771 - (NSView*)wrenchButton { |
772 return wrenchButton_; | 772 return wrenchButton_; |
773 } | 773 } |
774 | 774 |
775 - (void)activatePageAction:(const std::string&)extension_id { | |
776 locationBarView_->ActivatePageAction(extension_id); | |
777 } | |
778 | |
779 // Activates the browser action for the extension that has the given id. | |
780 - (void)activateBrowserAction:(const std::string&)extension_id { | |
781 [browserActionsController_ activateBrowserAction:extension_id]; | |
782 } | |
783 | |
784 // (URLDropTargetController protocol) | 775 // (URLDropTargetController protocol) |
785 - (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point { | 776 - (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point { |
786 // TODO(viettrungluu): This code is more or less copied from the code in | 777 // TODO(viettrungluu): This code is more or less copied from the code in |
787 // |TabStripController|. I'll refactor this soon to make it common and expand | 778 // |TabStripController|. I'll refactor this soon to make it common and expand |
788 // its capabilities (e.g., allow text DnD). | 779 // its capabilities (e.g., allow text DnD). |
789 if ([urls count] < 1) { | 780 if ([urls count] < 1) { |
790 NOTREACHED(); | 781 NOTREACHED(); |
791 return; | 782 return; |
792 } | 783 } |
793 | 784 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 - (void)hideDropURLsIndicatorInView:(NSView*)view { | 826 - (void)hideDropURLsIndicatorInView:(NSView*)view { |
836 // Do nothing. | 827 // Do nothing. |
837 } | 828 } |
838 | 829 |
839 // (URLDropTargetController protocol) | 830 // (URLDropTargetController protocol) |
840 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { | 831 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { |
841 return drag_util::IsUnsupportedDropData(profile_, info); | 832 return drag_util::IsUnsupportedDropData(profile_, info); |
842 } | 833 } |
843 | 834 |
844 @end | 835 @end |
OLD | NEW |