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