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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.h

Issue 388313002: mac: Allow WebContents key handling to supplant extension overrides of the bookmark shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from yoz and shess. Created 6 years, 5 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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
7 7
8 // A class acting as the Objective-C controller for the Browser 8 // A class acting as the Objective-C controller for the Browser
9 // object. Handles interactions between Cocoa and the cross-platform 9 // object. Handles interactions between Cocoa and the cross-platform
10 // code. Each window has a single toolbar and, by virtue of being a 10 // code. Each window has a single toolbar and, by virtue of being a
11 // TabWindowController, a tab strip along the top. 11 // TabWindowController, a tab strip along the top.
12 12
13 #import <Cocoa/Cocoa.h> 13 #import <Cocoa/Cocoa.h>
14 14
15 #include "base/mac/scoped_nsobject.h" 15 #include "base/mac/scoped_nsobject.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "chrome/browser/translate/chrome_translate_client.h" 17 #include "chrome/browser/translate/chrome_translate_client.h"
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
20 #import "chrome/browser/ui/cocoa/browser_command_executor.h" 20 #import "chrome/browser/ui/cocoa/browser_command_executor.h"
21 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" 21 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h"
22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
24 #import "chrome/browser/ui/cocoa/themed_window.h" 24 #import "chrome/browser/ui/cocoa/themed_window.h"
25 #import "chrome/browser/ui/cocoa/url_drop_target.h" 25 #import "chrome/browser/ui/cocoa/url_drop_target.h"
26 #import "chrome/browser/ui/cocoa/view_resizer.h" 26 #import "chrome/browser/ui/cocoa/view_resizer.h"
27 #include "components/translate/core/common/translate_errors.h" 27 #include "components/translate/core/common/translate_errors.h"
28 #include "ui/base/accelerators/accelerator_manager.h"
28 #include "ui/gfx/rect.h" 29 #include "ui/gfx/rect.h"
29 30
30 @class AvatarBaseController; 31 @class AvatarBaseController;
31 class Browser; 32 class Browser;
32 class BrowserWindow; 33 class BrowserWindow;
33 class BrowserWindowCocoa; 34 class BrowserWindowCocoa;
34 @class DevToolsController; 35 @class DevToolsController;
35 @class DownloadShelfController; 36 @class DownloadShelfController;
36 class ExtensionKeybindingRegistryCocoa; 37 class ExtensionKeybindingRegistryCocoa;
37 @class FindBarCocoaController; 38 @class FindBarCocoaController;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // The user changed the theme. 302 // The user changed the theme.
302 - (void)userChangedTheme; 303 - (void)userChangedTheme;
303 304
304 // Executes the command in the context of the current browser. 305 // Executes the command in the context of the current browser.
305 // |command| is an integer value containing one of the constants defined in the 306 // |command| is an integer value containing one of the constants defined in the
306 // "chrome/app/chrome_command_ids.h" file. 307 // "chrome/app/chrome_command_ids.h" file.
307 - (void)executeCommand:(int)command; 308 - (void)executeCommand:(int)command;
308 309
309 // Consults the Command Registry to see if this |event| needs to be handled as 310 // Consults the Command Registry to see if this |event| needs to be handled as
310 // an extension command and returns YES if so (NO otherwise). 311 // an extension command and returns YES if so (NO otherwise).
311 - (BOOL)handledByExtensionCommand:(NSEvent*)event; 312 // Only extensions with the given |priority| are considered.
313 - (BOOL)handledByExtensionCommand:(NSEvent*)event
314 priority:(ui::AcceleratorManager::HandlerPriority)priority;
312 315
313 // Delegate method for the status bubble to query its base frame. 316 // Delegate method for the status bubble to query its base frame.
314 - (NSRect)statusBubbleBaseFrame; 317 - (NSRect)statusBubbleBaseFrame;
315 318
316 // Show the bookmark bubble (e.g. user just clicked on the STAR) 319 // Show the bookmark bubble (e.g. user just clicked on the STAR)
317 - (void)showBookmarkBubbleForURL:(const GURL&)url 320 - (void)showBookmarkBubbleForURL:(const GURL&)url
318 alreadyBookmarked:(BOOL)alreadyBookmarked; 321 alreadyBookmarked:(BOOL)alreadyBookmarked;
319 322
320 // Show the translate bubble. 323 // Show the translate bubble.
321 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents 324 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // positioned relative to. 535 // positioned relative to.
533 - (NSRect)omniboxPopupAnchorRect; 536 - (NSRect)omniboxPopupAnchorRect;
534 537
535 // Force a layout of info bars. 538 // Force a layout of info bars.
536 - (void)layoutInfoBars; 539 - (void)layoutInfoBars;
537 540
538 @end // @interface BrowserWindowController (TestingAPI) 541 @end // @interface BrowserWindowController (TestingAPI)
539 542
540 543
541 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 544 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698