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

Side by Side Diff: views/widget/widget.cc

Issue 7075019: Move a bunch of functions 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/widget/widget.h ('k') | views/window/native_window.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 #include "views/widget/widget.h" 5 #include "views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "ui/gfx/compositor/compositor.h" 9 #include "ui/gfx/compositor/compositor.h"
10 #include "views/focus/view_storage.h" 10 #include "views/focus/view_storage.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 207
208 void Widget::Show() { 208 void Widget::Show() {
209 native_widget_->Show(); 209 native_widget_->Show();
210 } 210 }
211 211
212 void Widget::Hide() { 212 void Widget::Hide() {
213 native_widget_->Hide(); 213 native_widget_->Hide();
214 } 214 }
215 215
216 void Widget::Activate() {
217 native_widget_->Activate();
218 }
219
220 void Widget::Deactivate() {
221 native_widget_->Deactivate();
222 }
223
216 bool Widget::IsActive() const { 224 bool Widget::IsActive() const {
217 return native_widget_->IsActive(); 225 return native_widget_->IsActive();
218 } 226 }
219 227
228 void Widget::SetAlwaysOnTop(bool on_top) {
229 native_widget_->SetAlwaysOnTop(on_top);
230 }
231
232 void Widget::Maximize() {
233 native_widget_->Maximize();
234 }
235
236 void Widget::Minimize() {
237 native_widget_->Minimize();
238 }
239
240 void Widget::Restore() {
241 native_widget_->Restore();
242 }
243
244 bool Widget::IsMaximized() const {
245 return native_widget_->IsMaximized();
246 }
247
248 bool Widget::IsMinimized() const {
249 return native_widget_->IsMinimized();
250 }
251
220 void Widget::SetOpacity(unsigned char opacity) { 252 void Widget::SetOpacity(unsigned char opacity) {
221 native_widget_->SetOpacity(opacity); 253 native_widget_->SetOpacity(opacity);
222 } 254 }
223 255
224 void Widget::SetAlwaysOnTop(bool on_top) {
225 native_widget_->SetAlwaysOnTop(on_top);
226 }
227
228 View* Widget::GetRootView() { 256 View* Widget::GetRootView() {
229 if (!root_view_.get()) { 257 if (!root_view_.get()) {
230 // First time the root view is being asked for, create it now. 258 // First time the root view is being asked for, create it now.
231 root_view_.reset(CreateRootView()); 259 root_view_.reset(CreateRootView());
232 } 260 }
233 return root_view_.get(); 261 return root_view_.get();
234 } 262 }
235 263
236 bool Widget::IsVisible() const { 264 bool Widget::IsVisible() const {
237 return native_widget_->IsVisible(); 265 return native_widget_->IsVisible();
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 gfx::AcceleratedWidget widget = native_widget_->GetAcceleratedWidget(); 545 gfx::AcceleratedWidget widget = native_widget_->GetAcceleratedWidget();
518 if (widget != gfx::kNullAcceleratedWidget) 546 if (widget != gfx::kNullAcceleratedWidget)
519 compositor_ = ui::Compositor::Create(widget); 547 compositor_ = ui::Compositor::Create(widget);
520 } 548 }
521 549
522 bool Widget::ShouldReleaseCaptureOnMouseReleased() const { 550 bool Widget::ShouldReleaseCaptureOnMouseReleased() const {
523 return true; 551 return true;
524 } 552 }
525 553
526 } // namespace views 554 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget.h ('k') | views/window/native_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698