| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/lifetime/browser_close_manager.h" | 10 #include "chrome/browser/lifetime/browser_close_manager.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // changed. We might choose to update the window size to accomodate this | 340 // changed. We might choose to update the window size to accomodate this |
| 341 // change. | 341 // change. |
| 342 // Note that this won't be fired if we change tabs. | 342 // Note that this won't be fired if we change tabs. |
| 343 virtual void UpdatePreferredSize(content::WebContents* web_contents, | 343 virtual void UpdatePreferredSize(content::WebContents* web_contents, |
| 344 const gfx::Size& pref_size) {} | 344 const gfx::Size& pref_size) {} |
| 345 | 345 |
| 346 // Invoked when the contents auto-resized and the container should match it. | 346 // Invoked when the contents auto-resized and the container should match it. |
| 347 virtual void ResizeDueToAutoResize(content::WebContents* web_contents, | 347 virtual void ResizeDueToAutoResize(content::WebContents* web_contents, |
| 348 const gfx::Size& new_size) {} | 348 const gfx::Size& new_size) {} |
| 349 | 349 |
| 350 // Returns a pointer to the BrowserWindow* interface implementation (an |
| 351 // instance of this object, typically) for a given native window, or null if |
| 352 // there is no such association. |
| 353 // |
| 354 // Don't use this unless you only have a NativeWindow. In nearly all |
| 355 // situations plumb through browser and use it. |
| 356 static BrowserWindow* GetBrowserWindowForNativeWindow( |
| 357 gfx::NativeWindow window); |
| 358 |
| 350 // Construct a BrowserWindow implementation for the specified |browser|. | 359 // Construct a BrowserWindow implementation for the specified |browser|. |
| 351 static BrowserWindow* CreateBrowserWindow(Browser* browser, | 360 static BrowserWindow* CreateBrowserWindow(Browser* browser, |
| 352 bool user_gesture); | 361 bool user_gesture); |
| 353 | 362 |
| 354 // Shows the avatar bubble on the window frame off of the avatar button with | 363 // Shows the avatar bubble on the window frame off of the avatar button with |
| 355 // the given mode. The Service Type specified by GAIA is provided as well. | 364 // the given mode. The Service Type specified by GAIA is provided as well. |
| 356 // |access_point| indicates the access point used to open the Gaia sign in | 365 // |access_point| indicates the access point used to open the Gaia sign in |
| 357 // page. | 366 // page. |
| 358 enum AvatarBubbleMode { | 367 enum AvatarBubbleMode { |
| 359 AVATAR_BUBBLE_MODE_DEFAULT, | 368 AVATAR_BUBBLE_MODE_DEFAULT, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 virtual std::string GetWorkspace() const = 0; | 403 virtual std::string GetWorkspace() const = 0; |
| 395 virtual bool IsVisibleOnAllWorkspaces() const = 0; | 404 virtual bool IsVisibleOnAllWorkspaces() const = 0; |
| 396 | 405 |
| 397 protected: | 406 protected: |
| 398 friend class BrowserCloseManager; | 407 friend class BrowserCloseManager; |
| 399 friend class BrowserView; | 408 friend class BrowserView; |
| 400 virtual void DestroyBrowser() = 0; | 409 virtual void DestroyBrowser() = 0; |
| 401 }; | 410 }; |
| 402 | 411 |
| 403 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ | 412 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
| OLD | NEW |