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

Unified Diff: views/window/window.h

Issue 6976040: Revert 86914 - Move a bunch of functions from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/window/native_window_win.cc ('k') | views/window/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/window/window.h
===================================================================
--- views/window/window.h (revision 86938)
+++ views/window/window.h (working copy)
@@ -30,6 +30,15 @@
//
// Encapsulates window-like behavior. See WindowDelegate.
//
+// TODO(beng): Subclass Widget as part of V2.
+//
+// TODO(beng): Note that this class being non-abstract means that we have a
+// violation of Google style in that we are using multiple
+// inheritance. The intention is to split this into a separate
+// object associated with but not equal to a NativeWidget
+// implementation. Multiple inheritance is required for this
+// transitional step.
+//
class Window : public Widget,
public internal::NativeWindowDelegate {
public:
@@ -85,15 +94,50 @@
// monitor.
void SetWindowBounds(const gfx::Rect& bounds, gfx::NativeWindow other_window);
+ // Makes the window visible.
+ void Show();
+
// Like Show(), but does not activate the window.
void ShowInactive();
+ // Hides the window. This does not delete the window, it just hides it. This
+ // always hides the window, it is separate from the stack maintained by
+ // Push/PopForceHidden.
+ virtual void HideWindow();
+
// Prevents the window from being rendered as deactivated the next time it is.
// This state is reset automatically as soon as the window becomes activated
// again. There is no ability to control the state through this API as this
// leads to sync problems.
void DisableInactiveRendering();
+ // Activates the window, assuming it already exists and is visible.
+ void Activate();
+
+ // Deactivates the window, making the next window in the Z order the active
+ // window.
+ void Deactivate();
+
+ // Closes the window, ultimately destroying it. The window hides immediately,
+ // and is destroyed after a return to the message loop. Close() can be called
+ // multiple times.
+ virtual void Close() OVERRIDE;
+
+ // Maximizes/minimizes/restores the window.
+ void Maximize();
+ void Minimize();
+ void Restore();
+
+ // Whether or not the window is currently active.
+ bool IsActive() const;
+
+ // Whether or not the window is currently visible.
+ bool IsVisible() const;
+
+ // Whether or not the window is maximized or minimized.
+ virtual bool IsMaximized() const;
+ bool IsMinimized() const;
+
// Accessors for fullscreen state.
void SetFullscreen(bool fullscreen);
bool IsFullscreen() const;
@@ -112,12 +156,18 @@
// Tell the window to update its icon from the delegate.
void UpdateWindowIcon();
+ // Sets whether or not the window is always-on-top.
+ void SetIsAlwaysOnTop(bool always_on_top);
+
// Creates an appropriate NonClientFrameView for this window.
virtual NonClientFrameView* CreateFrameViewForWindow();
// Updates the frame after an event caused it to be changed.
virtual void UpdateFrameAfterFrameChange();
+ // Retrieves the Window's native window handle.
+ gfx::NativeWindow GetNativeWindow() const;
+
void set_frame_type(FrameType frame_type) { frame_type_ = frame_type; }
FrameType frame_type() const { return frame_type_; }
@@ -131,10 +181,6 @@
// Tell the window that something caused the frame type to change.
void FrameTypeChanged();
- // Overridden from Widget:
- virtual void Show() OVERRIDE;
- virtual void Close() OVERRIDE;
-
WindowDelegate* window_delegate() {
return const_cast<WindowDelegate*>(
const_cast<const Window*>(this)->window_delegate());
« no previous file with comments | « views/window/native_window_win.cc ('k') | views/window/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698