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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc

Issue 54983005: Plumb native AppWindow input region through to window shape under Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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) 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 MONITORINFO monitor_info; 226 MONITORINFO monitor_info;
227 monitor_info.cbSize = sizeof(monitor_info); 227 monitor_info.cbSize = sizeof(monitor_info);
228 GetMonitorInfo(MonitorFromWindow(message_handler_->hwnd(), 228 GetMonitorInfo(MonitorFromWindow(message_handler_->hwnd(),
229 MONITOR_DEFAULTTONEAREST), 229 MONITOR_DEFAULTTONEAREST),
230 &monitor_info); 230 &monitor_info);
231 gfx::Rect pixel_bounds = gfx::Rect(monitor_info.rcWork); 231 gfx::Rect pixel_bounds = gfx::Rect(monitor_info.rcWork);
232 return gfx::win::ScreenToDIPRect(pixel_bounds); 232 return gfx::win::ScreenToDIPRect(pixel_bounds);
233 } 233 }
234 234
235 void DesktopRootWindowHostWin::SetShape(gfx::NativeRegion native_region) { 235 void DesktopRootWindowHostWin::SetShape(gfx::NativeRegion native_region) {
236 SkPath path; 236 if (native_region) {
237 native_region->getBoundaryPath(&path); 237 SkPath path;
238 message_handler_->SetRegion(gfx::CreateHRGNFromSkPath(path)); 238 native_region->getBoundaryPath(&path);
239 message_handler_->SetRegion(gfx::CreateHRGNFromSkPath(path));
240 } else {
241 message_handler_->SetRegion(NULL);
242 }
243
244 delete native_region;
Ben Goodger (Google) 2013/11/03 05:12:05 was this called for by the method docs? if not, ca
Wez 2013/11/03 23:52:02 The method has no docs (see https://code.google.co
239 } 245 }
240 246
241 void DesktopRootWindowHostWin::Activate() { 247 void DesktopRootWindowHostWin::Activate() {
242 message_handler_->Activate(); 248 message_handler_->Activate();
243 } 249 }
244 250
245 void DesktopRootWindowHostWin::Deactivate() { 251 void DesktopRootWindowHostWin::Deactivate() {
246 message_handler_->Deactivate(); 252 message_handler_->Deactivate();
247 } 253 }
248 254
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 875
870 // static 876 // static
871 DesktopRootWindowHost* DesktopRootWindowHost::Create( 877 DesktopRootWindowHost* DesktopRootWindowHost::Create(
872 internal::NativeWidgetDelegate* native_widget_delegate, 878 internal::NativeWidgetDelegate* native_widget_delegate,
873 DesktopNativeWidgetAura* desktop_native_widget_aura) { 879 DesktopNativeWidgetAura* desktop_native_widget_aura) {
874 return new DesktopRootWindowHostWin(native_widget_delegate, 880 return new DesktopRootWindowHostWin(native_widget_delegate,
875 desktop_native_widget_aura); 881 desktop_native_widget_aura);
876 } 882 }
877 883
878 } // namespace views 884 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698