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 #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 #include "chrome/browser/ui/tabs/tab_utils.h" | |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" | 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" |
20 #import "chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h" | 21 #import "chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h" |
21 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
22 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
23 #import "chrome/browser/ui/cocoa/themed_window.h" | 24 #import "chrome/browser/ui/cocoa/themed_window.h" |
24 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 25 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
25 #import "chrome/browser/ui/cocoa/view_resizer.h" | 26 #import "chrome/browser/ui/cocoa/view_resizer.h" |
26 #include "components/translate/core/common/translate_errors.h" | 27 #include "components/translate/core/common/translate_errors.h" |
27 #include "ui/base/accelerators/accelerator_manager.h" | 28 #include "ui/base/accelerators/accelerator_manager.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 | 364 |
364 // Called when the Add Search Engine dialog is closed. | 365 // Called when the Add Search Engine dialog is closed. |
365 - (void)sheetDidEnd:(NSWindow*)sheet | 366 - (void)sheetDidEnd:(NSWindow*)sheet |
366 returnCode:(NSInteger)code | 367 returnCode:(NSInteger)code |
367 context:(void*)context; | 368 context:(void*)context; |
368 | 369 |
369 // Executes the command registered by the extension that has the given id. | 370 // Executes the command registered by the extension that has the given id. |
370 - (void)executeExtensionCommand:(const std::string&)extension_id | 371 - (void)executeExtensionCommand:(const std::string&)extension_id |
371 command:(const extensions::Command&)command; | 372 command:(const extensions::Command&)command; |
372 | 373 |
374 // To set whether the window has a tab playing audio or muted audio playing. | |
375 - (void)setMediaState:(TabMediaState)mediaState; | |
376 | |
377 // Returns current media state, determined by the media state of tabs, set by | |
378 // UpdateMediaState. | |
379 - (TabMediaState)getMediaState; | |
Robert Sesek
2015/10/28 18:45:57
naming: Getters in Cocoa don't use the word "get",
| |
380 | |
373 @end // @interface BrowserWindowController | 381 @end // @interface BrowserWindowController |
374 | 382 |
375 | 383 |
376 // Methods having to do with the window type (normal/popup/app, and whether the | 384 // Methods having to do with the window type (normal/popup/app, and whether the |
377 // window has various features; fullscreen and presentation mode methods are | 385 // window has various features; fullscreen and presentation mode methods are |
378 // separate). | 386 // separate). |
379 @interface BrowserWindowController(WindowType) | 387 @interface BrowserWindowController(WindowType) |
380 | 388 |
381 // Determines whether this controller's window supports a given feature (i.e., | 389 // Determines whether this controller's window supports a given feature (i.e., |
382 // whether a given feature is or can be shown in the window). | 390 // whether a given feature is or can be shown in the window). |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
606 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; | 614 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; |
607 | 615 |
608 // Gets the rect, in window base coordinates, that the omnibox popup should be | 616 // Gets the rect, in window base coordinates, that the omnibox popup should be |
609 // positioned relative to. | 617 // positioned relative to. |
610 - (NSRect)omniboxPopupAnchorRect; | 618 - (NSRect)omniboxPopupAnchorRect; |
611 | 619 |
612 @end // @interface BrowserWindowController (TestingAPI) | 620 @end // @interface BrowserWindowController (TestingAPI) |
613 | 621 |
614 | 622 |
615 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 623 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |