| 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_BASE_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_BASE_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_BASE_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_BASE_WINDOW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/base/ui_base_types.h" // WindowShowState |
| 9 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| 10 | 11 |
| 11 namespace gfx { | 12 namespace gfx { |
| 12 class Rect; | 13 class Rect; |
| 13 } | 14 } |
| 14 | 15 |
| 15 class SkRegion; | 16 class SkRegion; |
| 16 | 17 |
| 17 // This API needs to be implemented by any window that might be accessed | 18 // This API needs to be implemented by any window that might be accessed |
| 18 // through chrome.windows or chrome.tabs (e.g. browser windows and panels). | 19 // through chrome.windows or chrome.tabs (e.g. browser windows and panels). |
| (...skipping 12 matching lines...) Expand all Loading... |
| 31 // Returns true if the window is full screen. | 32 // Returns true if the window is full screen. |
| 32 virtual bool IsFullscreen() const = 0; | 33 virtual bool IsFullscreen() const = 0; |
| 33 | 34 |
| 34 // Return a platform dependent identifier for this window. | 35 // Return a platform dependent identifier for this window. |
| 35 virtual gfx::NativeWindow GetNativeWindow() = 0; | 36 virtual gfx::NativeWindow GetNativeWindow() = 0; |
| 36 | 37 |
| 37 // Returns the nonmaximized bounds of the window (even if the window is | 38 // Returns the nonmaximized bounds of the window (even if the window is |
| 38 // currently maximized or minimized) in terms of the screen coordinates. | 39 // currently maximized or minimized) in terms of the screen coordinates. |
| 39 virtual gfx::Rect GetRestoredBounds() const = 0; | 40 virtual gfx::Rect GetRestoredBounds() const = 0; |
| 40 | 41 |
| 42 // Returns the restore state for the window (platform dependent). |
| 43 virtual ui::WindowShowState GetRestoredState() const = 0; |
| 44 |
| 41 // Retrieves the window's current bounds, including its window. | 45 // Retrieves the window's current bounds, including its window. |
| 42 // This will only differ from GetRestoredBounds() for maximized | 46 // This will only differ from GetRestoredBounds() for maximized |
| 43 // and minimized windows. | 47 // and minimized windows. |
| 44 virtual gfx::Rect GetBounds() const = 0; | 48 virtual gfx::Rect GetBounds() const = 0; |
| 45 | 49 |
| 46 // Shows the window, or activates it if it's already visible. | 50 // Shows the window, or activates it if it's already visible. |
| 47 virtual void Show() = 0; | 51 virtual void Show() = 0; |
| 48 | 52 |
| 49 // Hides the window. | 53 // Hides the window. |
| 50 virtual void Hide() = 0; | 54 virtual void Hide() = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 | 79 |
| 76 // Flashes the taskbar item associated with this window. | 80 // Flashes the taskbar item associated with this window. |
| 77 // Set |flash| to true to initiate flashing, false to stop flashing. | 81 // Set |flash| to true to initiate flashing, false to stop flashing. |
| 78 virtual void FlashFrame(bool flash) = 0; | 82 virtual void FlashFrame(bool flash) = 0; |
| 79 | 83 |
| 80 // Returns true if a window is set to be always on top. | 84 // Returns true if a window is set to be always on top. |
| 81 virtual bool IsAlwaysOnTop() const = 0; | 85 virtual bool IsAlwaysOnTop() const = 0; |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 #endif // CHROME_BROWSER_UI_BASE_WINDOW_H_ | 88 #endif // CHROME_BROWSER_UI_BASE_WINDOW_H_ |
| OLD | NEW |