| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |