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

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

Issue 1112813003: Pass gfx structs by const ref (gfx::Vector2d/F) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years, 7 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
« no previous file with comments | « ui/events/ozone/evdev/device_event_dispatcher_evdev.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_window_tree_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 gfx::Size GetExpandedWindowSize(DWORD window_style, gfx::Size size) { 50 gfx::Size GetExpandedWindowSize(DWORD window_style, gfx::Size size) {
51 if (!(window_style & WS_EX_COMPOSITED) || !ui::win::IsAeroGlassEnabled()) 51 if (!(window_style & WS_EX_COMPOSITED) || !ui::win::IsAeroGlassEnabled())
52 return size; 52 return size;
53 53
54 // Some AMD drivers can't display windows that are less than 64x64 pixels, 54 // Some AMD drivers can't display windows that are less than 64x64 pixels,
55 // so expand them to be at least that size. http://crbug.com/286609 55 // so expand them to be at least that size. http://crbug.com/286609
56 gfx::Size expanded(std::max(size.width(), 64), std::max(size.height(), 64)); 56 gfx::Size expanded(std::max(size.width(), 64), std::max(size.height(), 64));
57 return expanded; 57 return expanded;
58 } 58 }
59 59
60 void InsetBottomRight(gfx::Rect* rect, gfx::Vector2d vector) { 60 void InsetBottomRight(gfx::Rect* rect, const gfx::Vector2d& vector) {
61 rect->Inset(0, 0, vector.x(), vector.y()); 61 rect->Inset(0, 0, vector.x(), vector.y());
62 } 62 }
63 63
64 } // namespace 64 } // namespace
65 65
66 DEFINE_WINDOW_PROPERTY_KEY(aura::Window*, kContentWindowForRootWindow, NULL); 66 DEFINE_WINDOW_PROPERTY_KEY(aura::Window*, kContentWindowForRootWindow, NULL);
67 67
68 // Identifies the DesktopWindowTreeHostWin associated with the 68 // Identifies the DesktopWindowTreeHostWin associated with the
69 // WindowEventDispatcher. 69 // WindowEventDispatcher.
70 DEFINE_WINDOW_PROPERTY_KEY(DesktopWindowTreeHostWin*, kDesktopWindowTreeHostKey, 70 DEFINE_WINDOW_PROPERTY_KEY(DesktopWindowTreeHostWin*, kDesktopWindowTreeHostKey,
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 998
999 // static 999 // static
1000 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 1000 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
1001 internal::NativeWidgetDelegate* native_widget_delegate, 1001 internal::NativeWidgetDelegate* native_widget_delegate,
1002 DesktopNativeWidgetAura* desktop_native_widget_aura) { 1002 DesktopNativeWidgetAura* desktop_native_widget_aura) {
1003 return new DesktopWindowTreeHostWin(native_widget_delegate, 1003 return new DesktopWindowTreeHostWin(native_widget_delegate,
1004 desktop_native_widget_aura); 1004 desktop_native_widget_aura);
1005 } 1005 }
1006 1006
1007 } // namespace views 1007 } // namespace views
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/device_event_dispatcher_evdev.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698