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

Side by Side Diff: ui/platform_window/win/win_window.cc

Issue 1083833002: win: fix narrowing warning on vs2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/platform_window/win/win_window.h" 5 #include "ui/platform_window/win/win_window.h"
6 6
7 #include "base/profiler/scoped_tracker.h" 7 #include "base/profiler/scoped_tracker.h"
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/event_utils.h" 9 #include "ui/events/event_utils.h"
10 #include "ui/gfx/win/msg_util.h" 10 #include "ui/gfx/win/msg_util.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void WinWindow::MoveCursorTo(const gfx::Point& location) {} 108 void WinWindow::MoveCursorTo(const gfx::Point& location) {}
109 109
110 void WinWindow::ConfineCursorToBounds(const gfx::Rect& bounds) { 110 void WinWindow::ConfineCursorToBounds(const gfx::Rect& bounds) {
111 } 111 }
112 112
113 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { 113 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) {
114 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. 114 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
115 tracked_objects::ScopedTracker tracking_profile( 115 tracked_objects::ScopedTracker tracking_profile(
116 FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 WinWindow::OnMouseRange")); 116 FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 WinWindow::OnMouseRange"));
117 117
118 MSG msg = { hwnd(), message, w_param, l_param, GetMessageTime(), 118 MSG msg = { hwnd(), message, w_param, l_param,
119 static_cast<DWORD>(GetMessageTime()),
sky 2015/04/13 22:51:50 Wow, weird that GetMessageTime() isn't typed to DW
119 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } }; 120 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } };
120 MouseEvent event(msg); 121 MouseEvent event(msg);
121 if (IsMouseEventFromTouch(message)) 122 if (IsMouseEventFromTouch(message))
122 event.set_flags(event.flags() | EF_FROM_TOUCH); 123 event.set_flags(event.flags() | EF_FROM_TOUCH);
123 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) 124 if (!(event.flags() & ui::EF_IS_NON_CLIENT))
124 delegate_->DispatchEvent(&event); 125 delegate_->DispatchEvent(&event);
125 SetMsgHandled(event.handled()); 126 SetMsgHandled(event.handled());
126 return 0; 127 return 0;
127 } 128 }
128 129
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 214
214 namespace test { 215 namespace test {
215 216
216 // static 217 // static
217 void SetUsePopupAsRootWindowForTest(bool use) { 218 void SetUsePopupAsRootWindowForTest(bool use) {
218 use_popup_as_root_window_for_test = use; 219 use_popup_as_root_window_for_test = use;
219 } 220 }
220 221
221 } // namespace test 222 } // namespace test
222 } // namespace ui 223 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698