Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Side by Side Diff: chrome/browser/ui/base_window.h

Issue 10534079: Add support for managing active state of platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed redundant GetNativeWindow() decl in BrowserWindow Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.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).
19 20
20 class BaseWindow { 21 class BaseWindow {
21 public: 22 public:
22 // Returns true if the window is currently the active/focused window. 23 // Returns true if the window is currently the active/focused window.
23 virtual bool IsActive() const = 0; 24 virtual bool IsActive() const = 0;
24 25
25 // Returns true if the window is maximized (aka zoomed). 26 // Returns true if the window is maximized (aka zoomed).
26 virtual bool IsMaximized() const = 0; 27 virtual bool IsMaximized() const = 0;
27 28
28 // Returns true if the window is minimized. 29 // Returns true if the window is minimized.
29 virtual bool IsMinimized() const = 0; 30 virtual bool IsMinimized() const = 0;
30 31
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
35 // Return a platform dependent identifier for this window.
36 virtual gfx::NativeWindow GetNativeWindow() = 0;
37
34 // 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
35 // currently maximized or minimized) in terms of the screen coordinates. 39 // currently maximized or minimized) in terms of the screen coordinates.
36 virtual gfx::Rect GetRestoredBounds() const = 0; 40 virtual gfx::Rect GetRestoredBounds() const = 0;
37 41
38 // Retrieves the window's current bounds, including its window. 42 // Retrieves the window's current bounds, including its window.
39 // This will only differ from GetRestoredBounds() for maximized 43 // This will only differ from GetRestoredBounds() for maximized
40 // and minimized windows. 44 // and minimized windows.
41 virtual gfx::Rect GetBounds() const = 0; 45 virtual gfx::Rect GetBounds() const = 0;
42 46
43 // Shows the window, or activates it if it's already visible. 47 // Shows the window, or activates it if it's already visible.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 80
77 // Flashes the taskbar item associated with this window. 81 // Flashes the taskbar item associated with this window.
78 // Set |flash| to true to initiate flashing, false to stop flashing. 82 // Set |flash| to true to initiate flashing, false to stop flashing.
79 virtual void FlashFrame(bool flash) = 0; 83 virtual void FlashFrame(bool flash) = 0;
80 84
81 // Returns true if a window is set to be always on top. 85 // Returns true if a window is set to be always on top.
82 virtual bool IsAlwaysOnTop() const = 0; 86 virtual bool IsAlwaysOnTop() const = 0;
83 }; 87 };
84 88
85 #endif // CHROME_BROWSER_UI_BASE_WINDOW_H_ 89 #endif // CHROME_BROWSER_UI_BASE_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698