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

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

Issue 7015051: Re-land: (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/window/native_frame_view.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 19 matching lines...) Expand all
30 class NativeWindow { 30 class NativeWindow {
31 public: 31 public:
32 enum ShowState { 32 enum ShowState {
33 SHOW_RESTORED, 33 SHOW_RESTORED,
34 SHOW_MAXIMIZED, 34 SHOW_MAXIMIZED,
35 SHOW_INACTIVE 35 SHOW_INACTIVE
36 }; 36 };
37 37
38 virtual ~NativeWindow() {} 38 virtual ~NativeWindow() {}
39 39
40 static Window* CreateNativeWindow(); 40 // Creates an appropriate default NativeWindow implementation for the current
41 // OS/circumstance.
42 static NativeWindow* CreateNativeWindow(
43 internal::NativeWindowDelegate* delegate);
41 44
42 virtual Window* GetWindow() = 0; 45 virtual Window* GetWindow() = 0;
46 virtual const Window* GetWindow() const = 0;
43 47
44 virtual NativeWidget* AsNativeWidget() = 0; 48 virtual NativeWidget* AsNativeWidget() = 0;
45 virtual const NativeWidget* AsNativeWidget() const = 0; 49 virtual const NativeWidget* AsNativeWidget() const = 0;
46 50
47 protected: 51 protected:
48 friend class Window; 52 friend class Window;
49 53
50 // Returns the bounds of the window in screen coordinates for its non- 54 // Returns the bounds of the window in screen coordinates for its non-
51 // maximized state, regardless of whether or not it is currently maximized. 55 // maximized state, regardless of whether or not it is currently maximized.
52 virtual gfx::Rect GetRestoredBounds() const = 0; 56 virtual gfx::Rect GetRestoredBounds() const = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 virtual void Maximize() = 0; 97 virtual void Maximize() = 0;
94 virtual void Minimize() = 0; 98 virtual void Minimize() = 0;
95 virtual void Restore() = 0; 99 virtual void Restore() = 0;
96 virtual bool IsActive() const = 0; 100 virtual bool IsActive() const = 0;
97 virtual bool IsVisible() const = 0; 101 virtual bool IsVisible() const = 0;
98 virtual bool IsMaximized() const = 0; 102 virtual bool IsMaximized() const = 0;
99 virtual bool IsMinimized() const = 0; 103 virtual bool IsMinimized() const = 0;
100 virtual void SetFullscreen(bool fullscreen) = 0; 104 virtual void SetFullscreen(bool fullscreen) = 0;
101 virtual bool IsFullscreen() const = 0; 105 virtual bool IsFullscreen() const = 0;
102 virtual void SetAlwaysOnTop(bool always_on_top) = 0; 106 virtual void SetAlwaysOnTop(bool always_on_top) = 0;
103 virtual bool IsAppWindow() const = 0;
104 virtual void SetUseDragFrame(bool use_drag_frame) = 0; 107 virtual void SetUseDragFrame(bool use_drag_frame) = 0;
105 virtual NonClientFrameView* CreateFrameViewForWindow() = 0; 108 virtual NonClientFrameView* CreateFrameViewForWindow() = 0;
106 virtual void UpdateFrameAfterFrameChange() = 0; 109 virtual void UpdateFrameAfterFrameChange() = 0;
107 virtual gfx::NativeWindow GetNativeWindow() const = 0; 110 virtual gfx::NativeWindow GetNativeWindow() const = 0;
108 virtual bool ShouldUseNativeFrame() const = 0; 111 virtual bool ShouldUseNativeFrame() const = 0;
109 virtual void FrameTypeChanged() = 0; 112 virtual void FrameTypeChanged() = 0;
110 }; 113 };
111 114
112 } // namespace views 115 } // namespace views
113 116
114 #endif // VIEWS_WIDGET_NATIVE_WINDOW_H_ 117 #endif // VIEWS_WIDGET_NATIVE_WINDOW_H_
OLDNEW
« no previous file with comments | « views/window/native_frame_view.cc ('k') | views/window/native_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698