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

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

Issue 7585028: NativeWidgetViews: Implement widget activation/deactivation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
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/native_widget_views.h" 5 #include "views/widget/native_widget_views.h"
6 6
7 #include "ui/gfx/compositor/compositor.h" 7 #include "ui/gfx/compositor/compositor.h"
8 #include "views/desktop/desktop_window_view.h" 8 #include "views/desktop/desktop_window_view.h"
9 #include "views/view.h" 9 #include "views/view.h"
10 #include "views/views_delegate.h" 10 #include "views/views_delegate.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 const gfx::Rect& restored_bounds) { 371 const gfx::Rect& restored_bounds) {
372 Show(); 372 Show();
373 } 373 }
374 374
375 bool NativeWidgetViews::IsVisible() const { 375 bool NativeWidgetViews::IsVisible() const {
376 return view_->IsVisible(); 376 return view_->IsVisible();
377 } 377 }
378 378
379 void NativeWidgetViews::Activate() { 379 void NativeWidgetViews::Activate() {
380 // Enable WidgetObserverTest.ActivationChange when this is implemented. 380 // Enable WidgetObserverTest.ActivationChange when this is implemented.
381 NOTIMPLEMENTED(); 381 MoveToTop();
382 OnActivate(true);
382 } 383 }
383 384
384 void NativeWidgetViews::Deactivate() { 385 void NativeWidgetViews::Deactivate() {
385 NOTIMPLEMENTED(); 386 OnActivate(false);
386 } 387 }
387 388
388 bool NativeWidgetViews::IsActive() const { 389 bool NativeWidgetViews::IsActive() const {
389 return active_; 390 return active_;
390 } 391 }
391 392
392 void NativeWidgetViews::SetAlwaysOnTop(bool on_top) { 393 void NativeWidgetViews::SetAlwaysOnTop(bool on_top) {
393 NOTIMPLEMENTED(); 394 NOTIMPLEMENTED();
394 } 395 }
395 396
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 500
500 const internal::NativeWidgetPrivate* 501 const internal::NativeWidgetPrivate*
501 NativeWidgetViews::GetParentNativeWidget() const { 502 NativeWidgetViews::GetParentNativeWidget() const {
502 const Widget* containing_widget = view_ ? view_->GetWidget() : NULL; 503 const Widget* containing_widget = view_ ? view_->GetWidget() : NULL;
503 return containing_widget ? static_cast<const internal::NativeWidgetPrivate*>( 504 return containing_widget ? static_cast<const internal::NativeWidgetPrivate*>(
504 containing_widget->native_widget()) : 505 containing_widget->native_widget()) :
505 NULL; 506 NULL;
506 } 507 }
507 508
508 } // namespace views 509 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698