| 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_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 | 7 |
| 8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 virtual bool InPresentationMode() OVERRIDE; | 135 virtual bool InPresentationMode() OVERRIDE; |
| 136 virtual gfx::Rect GetInstantBounds() OVERRIDE; | 136 virtual gfx::Rect GetInstantBounds() OVERRIDE; |
| 137 virtual bool IsInstantTabShowing() OVERRIDE; | 137 virtual bool IsInstantTabShowing() OVERRIDE; |
| 138 virtual WindowOpenDisposition GetDispositionForPopupBounds( | 138 virtual WindowOpenDisposition GetDispositionForPopupBounds( |
| 139 const gfx::Rect& bounds) OVERRIDE; | 139 const gfx::Rect& bounds) OVERRIDE; |
| 140 virtual FindBar* CreateFindBar() OVERRIDE; | 140 virtual FindBar* CreateFindBar() OVERRIDE; |
| 141 virtual bool GetConstrainedWindowTopY(int* top_y) OVERRIDE; | 141 virtual bool GetConstrainedWindowTopY(int* top_y) OVERRIDE; |
| 142 virtual void ShowAvatarBubble(content::WebContents* web_contents, | 142 virtual void ShowAvatarBubble(content::WebContents* web_contents, |
| 143 const gfx::Rect& rect) OVERRIDE; | 143 const gfx::Rect& rect) OVERRIDE; |
| 144 virtual void ShowAvatarBubbleFromAvatarButton() OVERRIDE; | 144 virtual void ShowAvatarBubbleFromAvatarButton() OVERRIDE; |
| 145 virtual void ShowPasswordGenerationBubble( |
| 146 const gfx::Rect& rect, |
| 147 const content::PasswordForm& form, |
| 148 autofill::PasswordGenerator* password_generator) OVERRIDE; |
| 145 | 149 |
| 146 // Overridden from ExtensionKeybindingRegistry::Delegate: | 150 // Overridden from ExtensionKeybindingRegistry::Delegate: |
| 147 virtual extensions::ActiveTabPermissionGranter* | 151 virtual extensions::ActiveTabPermissionGranter* |
| 148 GetActiveTabPermissionGranter() OVERRIDE; | 152 GetActiveTabPermissionGranter() OVERRIDE; |
| 149 | 153 |
| 150 // Adds the given FindBar cocoa controller to this browser window. | 154 // Adds the given FindBar cocoa controller to this browser window. |
| 151 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 155 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
| 152 | 156 |
| 153 // Returns the cocoa-world BrowserWindowController | 157 // Returns the cocoa-world BrowserWindowController |
| 154 BrowserWindowController* cocoa_controller() { return controller_; } | 158 BrowserWindowController* cocoa_controller() { return controller_; } |
| 155 | 159 |
| 156 protected: | 160 protected: |
| 157 virtual void DestroyBrowser() OVERRIDE; | 161 virtual void DestroyBrowser() OVERRIDE; |
| 158 | 162 |
| 159 private: | 163 private: |
| 160 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 164 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
| 161 | 165 |
| 162 Browser* browser_; // weak, owned by controller | 166 Browser* browser_; // weak, owned by controller |
| 163 BrowserWindowController* controller_; // weak, owns us | 167 BrowserWindowController* controller_; // weak, owns us |
| 164 base::WeakPtrFactory<Browser> confirm_close_factory_; | 168 base::WeakPtrFactory<Browser> confirm_close_factory_; |
| 165 scoped_nsobject<NSString> pending_window_title_; | 169 scoped_nsobject<NSString> pending_window_title_; |
| 166 ui::WindowShowState initial_show_state_; | 170 ui::WindowShowState initial_show_state_; |
| 167 NSInteger attention_request_id_; // identifier from requestUserAttention | 171 NSInteger attention_request_id_; // identifier from requestUserAttention |
| 168 }; | 172 }; |
| 169 | 173 |
| 170 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 174 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |