| 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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 virtual void OpenTabpose(); | 109 virtual void OpenTabpose(); |
| 110 virtual void SetPresentationMode(bool presentation_mode); | 110 virtual void SetPresentationMode(bool presentation_mode); |
| 111 virtual bool InPresentationMode(); | 111 virtual bool InPresentationMode(); |
| 112 virtual void PrepareForInstant(); | 112 virtual void PrepareForInstant(); |
| 113 virtual void ShowInstant(TabContentsWrapper* preview); | 113 virtual void ShowInstant(TabContentsWrapper* preview); |
| 114 virtual void HideInstant(bool instant_is_active); | 114 virtual void HideInstant(bool instant_is_active); |
| 115 virtual gfx::Rect GetInstantBounds(); | 115 virtual gfx::Rect GetInstantBounds(); |
| 116 virtual WindowOpenDisposition GetDispositionForPopupBounds( | 116 virtual WindowOpenDisposition GetDispositionForPopupBounds( |
| 117 const gfx::Rect& bounds); | 117 const gfx::Rect& bounds); |
| 118 virtual FindBar* CreateFindBar() OVERRIDE; | 118 virtual FindBar* CreateFindBar() OVERRIDE; |
| 119 virtual void ShowAvatarBubble(TabContents* tab_contents, |
| 120 int x, int y) OVERRIDE; |
| 119 | 121 |
| 120 // Overridden from NotificationObserver | 122 // Overridden from NotificationObserver |
| 121 virtual void Observe(int type, | 123 virtual void Observe(int type, |
| 122 const NotificationSource& source, | 124 const NotificationSource& source, |
| 123 const NotificationDetails& details); | 125 const NotificationDetails& details); |
| 124 | 126 |
| 125 // Adds the given FindBar cocoa controller to this browser window. | 127 // Adds the given FindBar cocoa controller to this browser window. |
| 126 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 128 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
| 127 | 129 |
| 128 // Returns the cocoa-world BrowserWindowController | 130 // Returns the cocoa-world BrowserWindowController |
| 129 BrowserWindowController* cocoa_controller() { return controller_; } | 131 BrowserWindowController* cocoa_controller() { return controller_; } |
| 130 | 132 |
| 131 protected: | 133 protected: |
| 132 virtual void DestroyBrowser(); | 134 virtual void DestroyBrowser(); |
| 133 | 135 |
| 134 private: | 136 private: |
| 135 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 137 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 136 void UpdateSidebarForContents(TabContents* tab_contents); | 138 void UpdateSidebarForContents(TabContents* tab_contents); |
| 137 | 139 |
| 138 NotificationRegistrar registrar_; | 140 NotificationRegistrar registrar_; |
| 139 Browser* browser_; // weak, owned by controller | 141 Browser* browser_; // weak, owned by controller |
| 140 BrowserWindowController* controller_; // weak, owns us | 142 BrowserWindowController* controller_; // weak, owns us |
| 141 base::WeakPtrFactory<Browser> confirm_close_factory_; | 143 base::WeakPtrFactory<Browser> confirm_close_factory_; |
| 142 scoped_nsobject<NSString> pending_window_title_; | 144 scoped_nsobject<NSString> pending_window_title_; |
| 143 ui::WindowShowState initial_show_state_; | 145 ui::WindowShowState initial_show_state_; |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 148 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |