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 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // When going fullscreen for a tab, we need to store the URL and the | 162 // When going fullscreen for a tab, we need to store the URL and the |
163 // fullscreen type, since we can't show the bubble until | 163 // fullscreen type, since we can't show the bubble until |
164 // -windowDidEnterFullScreen: gets called. | 164 // -windowDidEnterFullScreen: gets called. |
165 GURL fullscreenUrl_; | 165 GURL fullscreenUrl_; |
166 FullscreenExitBubbleType fullscreenBubbleType_; | 166 FullscreenExitBubbleType fullscreenBubbleType_; |
167 | 167 |
168 // The Extension Command Registry used to determine which keyboard events to | 168 // The Extension Command Registry used to determine which keyboard events to |
169 // handle. | 169 // handle. |
170 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; | 170 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; |
171 | |
172 // The number of overlapped views being shown. | |
173 NSUInteger overlappedViewCount_; | |
174 } | 171 } |
175 | 172 |
176 // A convenience class method which gets the |BrowserWindowController| for a | 173 // A convenience class method which gets the |BrowserWindowController| for a |
177 // given window. This method returns nil if no window in the chain has a BWC. | 174 // given window. This method returns nil if no window in the chain has a BWC. |
178 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 175 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
179 | 176 |
180 // A convenience class method which gets the |BrowserWindowController| for a | 177 // A convenience class method which gets the |BrowserWindowController| for a |
181 // given view. This is the controller for the window containing |view|, if it | 178 // given view. This is the controller for the window containing |view|, if it |
182 // is a BWC, or the first controller in the parent-window chain that is a | 179 // is a BWC, or the first controller in the parent-window chain that is a |
183 // BWC. This method returns nil if no window in the chain has a BWC. | 180 // BWC. This method returns nil if no window in the chain has a BWC. |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 342 |
346 // Return the point to which a bubble window's arrow should point, in window | 343 // Return the point to which a bubble window's arrow should point, in window |
347 // coordinates. | 344 // coordinates. |
348 - (NSPoint)bookmarkBubblePoint; | 345 - (NSPoint)bookmarkBubblePoint; |
349 | 346 |
350 // Called when the Add Search Engine dialog is closed. | 347 // Called when the Add Search Engine dialog is closed. |
351 - (void)sheetDidEnd:(NSWindow*)sheet | 348 - (void)sheetDidEnd:(NSWindow*)sheet |
352 returnCode:(NSInteger)code | 349 returnCode:(NSInteger)code |
353 context:(void*)context; | 350 context:(void*)context; |
354 | 351 |
355 // Called when the find bar visibility changes. This is used to update the | |
356 // allowOverlappingViews state. | |
357 - (void)onFindBarVisibilityChanged; | |
358 | |
359 // Called when an overlapped view is shown. This is used to update the | |
360 // allowOverlappingViews state. Currently used for history overlay and | |
361 // confirm bubble. | |
362 - (void)onOverlappedViewShown; | |
363 | |
364 // Called when a history overlay is hidden. This is used to update the | |
365 // allowOverlappingViews state. Currently used for history overlay and | |
366 // confirm bubble. | |
367 - (void)onOverlappedViewHidden; | |
368 | |
369 // Executes the command registered by the extension that has the given id. | 352 // Executes the command registered by the extension that has the given id. |
370 - (void)executeExtensionCommand:(const std::string&)extension_id | 353 - (void)executeExtensionCommand:(const std::string&)extension_id |
371 command:(const extensions::Command&)command; | 354 command:(const extensions::Command&)command; |
372 | 355 |
373 // Activates the page action for the extension that has the given id. | 356 // Activates the page action for the extension that has the given id. |
374 - (void)activatePageAction:(const std::string&)extension_id; | 357 - (void)activatePageAction:(const std::string&)extension_id; |
375 | 358 |
376 // Activates the browser action for the extension that has the given id. | 359 // Activates the browser action for the extension that has the given id. |
377 - (void)activateBrowserAction:(const std::string&)extension_id; | 360 - (void)activateBrowserAction:(const std::string&)extension_id; |
378 | 361 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 // positioned relative to. | 519 // positioned relative to. |
537 - (NSRect)omniboxPopupAnchorRect; | 520 - (NSRect)omniboxPopupAnchorRect; |
538 | 521 |
539 // Force a layout of info bars. | 522 // Force a layout of info bars. |
540 - (void)layoutInfoBars; | 523 - (void)layoutInfoBars; |
541 | 524 |
542 @end // @interface BrowserWindowController (TestingAPI) | 525 @end // @interface BrowserWindowController (TestingAPI) |
543 | 526 |
544 | 527 |
545 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 528 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |