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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 161293002: mac: Allows extensions to hide the bookmark page menu item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure changes only apply to OSX. Created 6 years, 10 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
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 #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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 } 768 }
769 769
770 - (BrowserActionsController*)browserActionsController { 770 - (BrowserActionsController*)browserActionsController {
771 return browserActionsController_.get(); 771 return browserActionsController_.get();
772 } 772 }
773 773
774 - (NSView*)wrenchButton { 774 - (NSView*)wrenchButton {
775 return wrenchButton_; 775 return wrenchButton_;
776 } 776 }
777 777
778 - (void)activatePageAction:(const std::string&)extension_id {
779 locationBarView_->ActivatePageAction(extension_id);
780 }
781
782 // Activates the browser action for the extension that has the given id.
783 - (void)activateBrowserAction:(const std::string&)extension_id {
784 [browserActionsController_ activateBrowserAction:extension_id];
785 }
786
778 // (URLDropTargetController protocol) 787 // (URLDropTargetController protocol)
779 - (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point { 788 - (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point {
780 // TODO(viettrungluu): This code is more or less copied from the code in 789 // TODO(viettrungluu): This code is more or less copied from the code in
781 // |TabStripController|. I'll refactor this soon to make it common and expand 790 // |TabStripController|. I'll refactor this soon to make it common and expand
782 // its capabilities (e.g., allow text DnD). 791 // its capabilities (e.g., allow text DnD).
783 if ([urls count] < 1) { 792 if ([urls count] < 1) {
784 NOTREACHED(); 793 NOTREACHED();
785 return; 794 return;
786 } 795 }
787 796
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 - (void)hideDropURLsIndicatorInView:(NSView*)view { 838 - (void)hideDropURLsIndicatorInView:(NSView*)view {
830 // Do nothing. 839 // Do nothing.
831 } 840 }
832 841
833 // (URLDropTargetController protocol) 842 // (URLDropTargetController protocol)
834 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 843 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
835 return drag_util::IsUnsupportedDropData(profile_, info); 844 return drag_util::IsUnsupportedDropData(profile_, info);
836 } 845 }
837 846
838 @end 847 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.h ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698