summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 11:50:46 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 11:50:46 +0000
commit5f39adc248a281ceb57db98d272ee4b9c382b32f (patch)
treecd66186fbd6413f0fc1f372a449325ca4fdb6671 /ui
parent052d02d520c9c33432b0d50065922fbd3198d168 (diff)
downloadchromium_src-5f39adc248a281ceb57db98d272ee4b9c382b32f.zip
chromium_src-5f39adc248a281ceb57db98d272ee4b9c382b32f.tar.gz
chromium_src-5f39adc248a281ceb57db98d272ee4b9c382b32f.tar.bz2
Move chrome/browser/ui/base_window.h to ui/base
BUG=159366 Review URL: https://chromiumcodereview.appspot.com/15535008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/base_window.h91
-rw-r--r--ui/ui.gyp1
2 files changed, 92 insertions, 0 deletions
diff --git a/ui/base/base_window.h b/ui/base/base_window.h
new file mode 100644
index 0000000..4f847d1
--- /dev/null
+++ b/ui/base/base_window.h
@@ -0,0 +1,91 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_BASE_WINDOW_H_
+#define UI_BASE_BASE_WINDOW_H_
+
+#include "base/compiler_specific.h"
+#include "ui/base/ui_base_types.h" // WindowShowState
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class Rect;
+}
+
+class SkRegion;
+
+namespace ui {
+
+// Provides an interface to perform actions on windows, and query window
+// state.
+class BaseWindow {
+ public:
+ // Returns true if the window is currently the active/focused window.
+ virtual bool IsActive() const = 0;
+
+ // Returns true if the window is maximized (aka zoomed).
+ virtual bool IsMaximized() const = 0;
+
+ // Returns true if the window is minimized.
+ virtual bool IsMinimized() const = 0;
+
+ // Returns true if the window is full screen.
+ virtual bool IsFullscreen() const = 0;
+
+ // Return a platform dependent identifier for this window.
+ virtual gfx::NativeWindow GetNativeWindow() = 0;
+
+ // Returns the nonmaximized bounds of the window (even if the window is
+ // currently maximized or minimized) in terms of the screen coordinates.
+ virtual gfx::Rect GetRestoredBounds() const = 0;
+
+ // Returns the restore state for the window (platform dependent).
+ virtual ui::WindowShowState GetRestoredState() const = 0;
+
+ // Retrieves the window's current bounds, including its window.
+ // This will only differ from GetRestoredBounds() for maximized
+ // and minimized windows.
+ virtual gfx::Rect GetBounds() const = 0;
+
+ // Shows the window, or activates it if it's already visible.
+ virtual void Show() = 0;
+
+ // Hides the window.
+ virtual void Hide() = 0;
+
+ // Show the window, but do not activate it. Does nothing if window
+ // is already visible.
+ virtual void ShowInactive() = 0;
+
+ // Closes the window as soon as possible. The close action may be delayed
+ // if an operation is in progress (e.g. a drag operation).
+ virtual void Close() = 0;
+
+ // Activates (brings to front) the window. Restores the window from minimized
+ // state if necessary.
+ virtual void Activate() = 0;
+
+ // Deactivates the window, making the next window in the Z order the active
+ // window.
+ virtual void Deactivate() = 0;
+
+ // Maximizes/minimizes/restores the window.
+ virtual void Maximize() = 0;
+ virtual void Minimize() = 0;
+ virtual void Restore() = 0;
+
+ // Sets the window's size and position to the specified values.
+ virtual void SetBounds(const gfx::Rect& bounds) = 0;
+
+ // Flashes the taskbar item associated with this window.
+ // Set |flash| to true to initiate flashing, false to stop flashing.
+ virtual void FlashFrame(bool flash) = 0;
+
+ // Returns true if a window is set to be always on top.
+ virtual bool IsAlwaysOnTop() const = 0;
+};
+
+} // namespace ui
+
+#endif // UI_BASE_BASE_WINDOW_H_
diff --git a/ui/ui.gyp b/ui/ui.gyp
index d67d588..437238b 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -77,6 +77,7 @@
'base/animation/throb_animation.h',
'base/animation/tween.cc',
'base/animation/tween.h',
+ 'base/base_window.h',
'base/clipboard/clipboard.cc',
'base/clipboard/clipboard.h',
'base/clipboard/clipboard_android.cc',