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_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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 9 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
10 #include "chrome/common/content_settings_types.h" | 10 #include "chrome/common/content_settings_types.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 class Extension; | 38 class Extension; |
39 | 39 |
40 //////////////////////////////////////////////////////////////////////////////// | 40 //////////////////////////////////////////////////////////////////////////////// |
41 // BrowserWindow interface | 41 // BrowserWindow interface |
42 // An interface implemented by the "view" of the Browser window. | 42 // An interface implemented by the "view" of the Browser window. |
43 // | 43 // |
44 // NOTE: All getters may return NULL. | 44 // NOTE: All getters may return NULL. |
45 class BrowserWindow { | 45 class BrowserWindow { |
46 public: | 46 public: |
| 47 enum ShowContext { |
| 48 SHOW_CONTEXT_NORMAL, |
| 49 SHOW_CONTEXT_RESTORE |
| 50 }; |
| 51 |
47 virtual ~BrowserWindow() {} | 52 virtual ~BrowserWindow() {} |
48 | 53 |
49 // Show the window, or activates it if it's already visible. | 54 // Show the window, or activates it if it's already visible. |show_context| |
50 virtual void Show() = 0; | 55 // specifies the context under which the show is taking place. In the restore |
| 56 // cases, session restore is in effect, and on Mac this determines the type |
| 57 // of animation to apply. |
| 58 virtual void Show(ShowContext show_context) = 0; |
51 | 59 |
52 // Show the window, but do not activate it. Does nothing if window | 60 // Show the window, but do not activate it. Does nothing if window |
53 // is already visible. | 61 // is already visible. |
54 virtual void ShowInactive() = 0; | 62 virtual void ShowInactive() = 0; |
55 | 63 |
56 // Sets the window's size and position to the specified values. | 64 // Sets the window's size and position to the specified values. |
57 virtual void SetBounds(const gfx::Rect& bounds) = 0; | 65 virtual void SetBounds(const gfx::Rect& bounds) = 0; |
58 | 66 |
59 // Closes the frame as soon as possible. If the frame is not in a drag | 67 // Closes the frame as soon as possible. If the frame is not in a drag |
60 // session, it will close immediately; otherwise, it will move offscreen (so | 68 // session, it will close immediately; otherwise, it will move offscreen (so |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 389 |
382 // Returns the ToolbarView. | 390 // Returns the ToolbarView. |
383 virtual ToolbarView* GetToolbarView() const = 0; | 391 virtual ToolbarView* GetToolbarView() const = 0; |
384 #endif | 392 #endif |
385 | 393 |
386 protected: | 394 protected: |
387 virtual ~BrowserWindowTesting() {} | 395 virtual ~BrowserWindowTesting() {} |
388 }; | 396 }; |
389 | 397 |
390 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ | 398 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
OLD | NEW |