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

Side by Side Diff: views/window/native_window_views.cc

Issue 7069022: Adds a basic NativeWindowViews. (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_window_views.h ('k') | views/window/native_window_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "views/window/native_window_views.h"
6
7 #include "views/view.h"
8
9 namespace views {
10
11 ////////////////////////////////////////////////////////////////////////////////
12 // NativeWindowViews, public:
13
14 NativeWindowViews::NativeWindowViews(View* host,
15 internal::NativeWindowDelegate* delegate)
16 : NativeWidgetViews(host, delegate->AsNativeWidgetDelegate()),
17 delegate_(delegate) {
18 }
19
20 NativeWindowViews::~NativeWindowViews() {
21 }
22
23 ////////////////////////////////////////////////////////////////////////////////
24 // NativeWindowViews, NativeWindow implementation:
25
26 Window* NativeWindowViews::GetWindow() {
27 return delegate_->AsWindow();
28 }
29
30 const Window* NativeWindowViews::GetWindow() const {
31 return delegate_->AsWindow();
32 }
33
34 NativeWidget* NativeWindowViews::AsNativeWidget() {
35 return this;
36 }
37
38 const NativeWidget* NativeWindowViews::AsNativeWidget() const {
39 return this;
40 }
41
42 gfx::Rect NativeWindowViews::GetRestoredBounds() const {
43 NOTIMPLEMENTED();
44 return GetView()->bounds();
45 }
46
47 void NativeWindowViews::ShowNativeWindow(ShowState state) {
48 NOTIMPLEMENTED();
49 GetView()->SetVisible(true);
50 }
51
52 void NativeWindowViews::BecomeModal() {
53 NOTIMPLEMENTED();
54 }
55
56 void NativeWindowViews::CenterWindow(const gfx::Size& size) {
57 // TODO(beng): actually center.
58 GetView()->SetBounds(0, 0, size.width(), size.height());
59 }
60
61 void NativeWindowViews::GetWindowBoundsAndMaximizedState(
62 gfx::Rect* bounds,
63 bool* maximized) const {
64 *bounds = GetView()->bounds();
65 *maximized = false;
66 }
67
68 void NativeWindowViews::EnableClose(bool enable) {
69 }
70
71 void NativeWindowViews::SetWindowTitle(const std::wstring& title) {
72 }
73
74 void NativeWindowViews::SetWindowIcons(const SkBitmap& window_icon,
75 const SkBitmap& app_icon) {
76 }
77
78 void NativeWindowViews::SetAccessibleName(const std::wstring& name) {
79 }
80
81 void NativeWindowViews::SetAccessibleRole(ui::AccessibilityTypes::Role role) {
82 }
83
84 void NativeWindowViews::SetAccessibleState(
85 ui::AccessibilityTypes::State state) {
86 }
87
88 void NativeWindowViews::SetWindowBounds(const gfx::Rect& bounds,
89 gfx::NativeWindow other_window) {
90 if (other_window)
91 NOTIMPLEMENTED();
92 GetView()->SetBoundsRect(bounds);
93 }
94
95 void NativeWindowViews::HideWindow() {
96 GetView()->SetVisible(false);
97 }
98
99 void NativeWindowViews::Activate() {
100 NOTIMPLEMENTED();
101 }
102
103 void NativeWindowViews::Deactivate() {
104 NOTIMPLEMENTED();
105 }
106
107 void NativeWindowViews::Maximize() {
108 NOTIMPLEMENTED();
109 }
110
111 void NativeWindowViews::Minimize() {
112 NOTIMPLEMENTED();
113 }
114
115 void NativeWindowViews::Restore() {
116 NOTIMPLEMENTED();
117 }
118
119 bool NativeWindowViews::IsActive() const {
120 NOTIMPLEMENTED();
121 return false;
122 }
123
124 bool NativeWindowViews::IsVisible() const {
125 return GetView()->IsVisible();
126 }
127
128 bool NativeWindowViews::IsMaximized() const {
129 NOTIMPLEMENTED();
130 return false;
131 }
132
133 bool NativeWindowViews::IsMinimized() const {
134 NOTIMPLEMENTED();
135 return false;
136 }
137
138 void NativeWindowViews::SetFullscreen(bool fullscreen) {
139 }
140
141 bool NativeWindowViews::IsFullscreen() const {
142 NOTIMPLEMENTED();
143 return false;
144 }
145
146 void NativeWindowViews::SetAlwaysOnTop(bool always_on_top) {
147 }
148
149 void NativeWindowViews::SetUseDragFrame(bool use_drag_frame) {
150 }
151
152 NonClientFrameView* NativeWindowViews::CreateFrameViewForWindow() {
153 return NULL;
154 }
155
156 void NativeWindowViews::UpdateFrameAfterFrameChange() {
157 }
158
159 gfx::NativeWindow NativeWindowViews::GetNativeWindow() const {
160 return NULL;
161 }
162
163 bool NativeWindowViews::ShouldUseNativeFrame() const {
164 NOTIMPLEMENTED();
165 return false;
166 }
167
168 void NativeWindowViews::FrameTypeChanged() {
169 }
170
171 } // namespace views
OLDNEW
« no previous file with comments | « views/window/native_window_views.h ('k') | views/window/native_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698