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

Side by Side Diff: views/window/native_window.h

Issue 7054052: Move more from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « views/window/dialog_delegate.cc ('k') | views/window/native_window_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VIEWS_WIDGET_NATIVE_WINDOW_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WINDOW_H_
6 #define VIEWS_WIDGET_NATIVE_WINDOW_H_ 6 #define VIEWS_WIDGET_NATIVE_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/base/accessibility/accessibility_types.h" 9 #include "ui/base/accessibility/accessibility_types.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 11 matching lines...) Expand all
22 class NativeWidget; 22 class NativeWidget;
23 class NonClientFrameView; 23 class NonClientFrameView;
24 24
25 //////////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////////
26 // NativeWindow interface 26 // NativeWindow interface
27 // 27 //
28 // An interface implemented by an object that encapsulates a native window. 28 // An interface implemented by an object that encapsulates a native window.
29 // 29 //
30 class NativeWindow { 30 class NativeWindow {
31 public: 31 public:
32 enum ShowState {
33 SHOW_RESTORED,
34 SHOW_MAXIMIZED,
35 SHOW_INACTIVE
36 };
37
38 virtual ~NativeWindow() {} 32 virtual ~NativeWindow() {}
39 33
40 // Creates an appropriate default NativeWindow implementation for the current 34 // Creates an appropriate default NativeWindow implementation for the current
41 // OS/circumstance. 35 // OS/circumstance.
42 static NativeWindow* CreateNativeWindow( 36 static NativeWindow* CreateNativeWindow(
43 internal::NativeWindowDelegate* delegate); 37 internal::NativeWindowDelegate* delegate);
44 38
45 virtual Window* GetWindow() = 0; 39 virtual Window* GetWindow() = 0;
46 virtual const Window* GetWindow() const = 0; 40 virtual const Window* GetWindow() const = 0;
47 41
48 virtual NativeWidget* AsNativeWidget() = 0; 42 virtual NativeWidget* AsNativeWidget() = 0;
49 virtual const NativeWidget* AsNativeWidget() const = 0; 43 virtual const NativeWidget* AsNativeWidget() const = 0;
50 44
51 protected: 45 protected:
52 friend class Window; 46 friend class Window;
53 47
54 // Returns the bounds of the window in screen coordinates for its non-
55 // maximized state, regardless of whether or not it is currently maximized.
56 virtual gfx::Rect GetRestoredBounds() const = 0;
57
58 // Shows the window.
59 virtual void ShowNativeWindow(ShowState state) = 0;
60
61 // Makes the NativeWindow modal. 48 // Makes the NativeWindow modal.
62 virtual void BecomeModal() = 0; 49 virtual void BecomeModal() = 0;
63
64 // Enables or disables the close button for the window.
65 virtual void EnableClose(bool enable) = 0;
66 }; 50 };
67 51
68 } // namespace views 52 } // namespace views
69 53
70 #endif // VIEWS_WIDGET_NATIVE_WINDOW_H_ 54 #endif // VIEWS_WIDGET_NATIVE_WINDOW_H_
OLDNEW
« no previous file with comments | « views/window/dialog_delegate.cc ('k') | views/window/native_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698