| 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 "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Reinitialize the status bubble, since it needs to be initialized | 126 // Reinitialize the status bubble, since it needs to be initialized |
| 127 // differently depending on whether or not DWM composition is enabled | 127 // differently depending on whether or not DWM composition is enabled |
| 128 browser_view_->InitStatusBubble(); | 128 browser_view_->InitStatusBubble(); |
| 129 | 129 |
| 130 // We need to update the glass region on or off before the base class adjusts | 130 // We need to update the glass region on or off before the base class adjusts |
| 131 // the window region. | 131 // the window region. |
| 132 UpdateDWMFrame(); | 132 UpdateDWMFrame(); |
| 133 DesktopWindowTreeHostWin::HandleFrameChanged(); | 133 DesktopWindowTreeHostWin::HandleFrameChanged(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void BrowserDesktopWindowTreeHostWin::HandleWindowScaleFactorChanged( |
| 137 float window_scale_factor) { |
| 138 DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged(window_scale_factor); |
| 139 minimize_button_metrics_.OnDpiChanged(); |
| 140 } |
| 141 |
| 136 bool BrowserDesktopWindowTreeHostWin::PreHandleMSG(UINT message, | 142 bool BrowserDesktopWindowTreeHostWin::PreHandleMSG(UINT message, |
| 137 WPARAM w_param, | 143 WPARAM w_param, |
| 138 LPARAM l_param, | 144 LPARAM l_param, |
| 139 LRESULT* result) { | 145 LRESULT* result) { |
| 140 switch (message) { | 146 switch (message) { |
| 141 case WM_ACTIVATE: | 147 case WM_ACTIVATE: |
| 142 if (LOWORD(w_param) != WA_INACTIVE) | 148 if (LOWORD(w_param) != WA_INACTIVE) |
| 143 minimize_button_metrics_.OnHWNDActivated(); | 149 minimize_button_metrics_.OnHWNDActivated(); |
| 144 return false; | 150 return false; |
| 145 case WM_ENDSESSION: | 151 case WM_ENDSESSION: |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( | 345 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( |
| 340 views::internal::NativeWidgetDelegate* native_widget_delegate, | 346 views::internal::NativeWidgetDelegate* native_widget_delegate, |
| 341 views::DesktopNativeWidgetAura* desktop_native_widget_aura, | 347 views::DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 342 BrowserView* browser_view, | 348 BrowserView* browser_view, |
| 343 BrowserFrame* browser_frame) { | 349 BrowserFrame* browser_frame) { |
| 344 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, | 350 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, |
| 345 desktop_native_widget_aura, | 351 desktop_native_widget_aura, |
| 346 browser_view, | 352 browser_view, |
| 347 browser_frame); | 353 browser_frame); |
| 348 } | 354 } |
| OLD | NEW |