| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/widget/desktop_aura/desktop_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h" |
| 6 | 6 |
| 7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 message_handler_->FlashFrame(flash_frame); | 376 message_handler_->FlashFrame(flash_frame); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void DesktopRootWindowHostWin::OnNativeWidgetFocus() { | 379 void DesktopRootWindowHostWin::OnNativeWidgetFocus() { |
| 380 // HWNDMessageHandler will perform the proper updating on its own. | 380 // HWNDMessageHandler will perform the proper updating on its own. |
| 381 } | 381 } |
| 382 | 382 |
| 383 void DesktopRootWindowHostWin::OnNativeWidgetBlur() { | 383 void DesktopRootWindowHostWin::OnNativeWidgetBlur() { |
| 384 } | 384 } |
| 385 | 385 |
| 386 void DesktopRootWindowHostWin::SetInactiveRenderingDisabled( |
| 387 bool disable_inactive) { |
| 388 // We call DefWindowProc of WM_NCACTIVATE to paint the caption as active or |
| 389 // inactive. This is safe with the only sideeffect being the |
| 390 // WM_GETTEXT message which is sent by DefWindowProc to get the text to be |
| 391 // displayed on the caption. |
| 392 ::DefWindowProc(message_handler_->hwnd(), |
| 393 WM_NCACTIVATE, |
| 394 !!disable_inactive, |
| 395 0); |
| 396 } |
| 397 |
| 386 //////////////////////////////////////////////////////////////////////////////// | 398 //////////////////////////////////////////////////////////////////////////////// |
| 387 // DesktopRootWindowHostWin, RootWindowHost implementation: | 399 // DesktopRootWindowHostWin, RootWindowHost implementation: |
| 388 | 400 |
| 389 | 401 |
| 390 void DesktopRootWindowHostWin::SetDelegate( | 402 void DesktopRootWindowHostWin::SetDelegate( |
| 391 aura::RootWindowHostDelegate* delegate) { | 403 aura::RootWindowHostDelegate* delegate) { |
| 392 root_window_host_delegate_ = delegate; | 404 root_window_host_delegate_ = delegate; |
| 393 } | 405 } |
| 394 | 406 |
| 395 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { | 407 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 871 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 860 internal::NativeWidgetDelegate* native_widget_delegate, | 872 internal::NativeWidgetDelegate* native_widget_delegate, |
| 861 DesktopNativeWidgetAura* desktop_native_widget_aura, | 873 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 862 const gfx::Rect& initial_bounds) { | 874 const gfx::Rect& initial_bounds) { |
| 863 return new DesktopRootWindowHostWin(native_widget_delegate, | 875 return new DesktopRootWindowHostWin(native_widget_delegate, |
| 864 desktop_native_widget_aura, | 876 desktop_native_widget_aura, |
| 865 initial_bounds); | 877 initial_bounds); |
| 866 } | 878 } |
| 867 | 879 |
| 868 } // namespace views | 880 } // namespace views |
| OLD | NEW |