| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 const Extension* app); | 102 const Extension* app); |
| 103 virtual void Cut(); | 103 virtual void Cut(); |
| 104 virtual void Copy(); | 104 virtual void Copy(); |
| 105 virtual void Paste(); | 105 virtual void Paste(); |
| 106 virtual void ToggleTabStripMode(); | 106 virtual void ToggleTabStripMode(); |
| 107 virtual void OpenTabpose(); | 107 virtual void OpenTabpose(); |
| 108 virtual void PrepareForInstant(); | 108 virtual void PrepareForInstant(); |
| 109 virtual void ShowInstant(TabContentsWrapper* preview); | 109 virtual void ShowInstant(TabContentsWrapper* preview); |
| 110 virtual void HideInstant(bool instant_is_active); | 110 virtual void HideInstant(bool instant_is_active); |
| 111 virtual gfx::Rect GetInstantBounds(); | 111 virtual gfx::Rect GetInstantBounds(); |
| 112 virtual WindowOpenDisposition GetDispositionForPopupBounds( |
| 113 const gfx::Rect& bounds); |
| 112 | 114 |
| 113 // Overridden from NotificationObserver | 115 // Overridden from NotificationObserver |
| 114 virtual void Observe(NotificationType type, | 116 virtual void Observe(NotificationType type, |
| 115 const NotificationSource& source, | 117 const NotificationSource& source, |
| 116 const NotificationDetails& details); | 118 const NotificationDetails& details); |
| 117 | 119 |
| 118 // Adds the given FindBar cocoa controller to this browser window. | 120 // Adds the given FindBar cocoa controller to this browser window. |
| 119 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 121 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
| 120 | 122 |
| 121 // Returns the cocoa-world BrowserWindowController | 123 // Returns the cocoa-world BrowserWindowController |
| 122 BrowserWindowController* cocoa_controller() { return controller_; } | 124 BrowserWindowController* cocoa_controller() { return controller_; } |
| 123 | 125 |
| 124 protected: | 126 protected: |
| 125 virtual void DestroyBrowser(); | 127 virtual void DestroyBrowser(); |
| 126 | 128 |
| 127 private: | 129 private: |
| 128 int GetCommandId(const NativeWebKeyboardEvent& event); | 130 int GetCommandId(const NativeWebKeyboardEvent& event); |
| 129 bool HandleKeyboardEventInternal(NSEvent* event); | 131 bool HandleKeyboardEventInternal(NSEvent* event); |
| 130 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 132 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 131 void UpdateSidebarForContents(TabContents* tab_contents); | 133 void UpdateSidebarForContents(TabContents* tab_contents); |
| 132 | 134 |
| 133 NotificationRegistrar registrar_; | 135 NotificationRegistrar registrar_; |
| 134 Browser* browser_; // weak, owned by controller | 136 Browser* browser_; // weak, owned by controller |
| 135 BrowserWindowController* controller_; // weak, owns us | 137 BrowserWindowController* controller_; // weak, owns us |
| 136 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; | 138 ScopedRunnableMethodFactory<Browser> confirm_close_factory_; |
| 137 scoped_nsobject<NSString> pending_window_title_; | 139 scoped_nsobject<NSString> pending_window_title_; |
| 138 }; | 140 }; |
| 139 | 141 |
| 140 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 142 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |