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

Side by Side Diff: ui/views/widget/root_view.cc

Issue 395563002: Make RootView::DispatchGestureEvent() non-virtual (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: static_cast encapsulated Created 6 years, 5 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 | Annotate | Revision Log
« ui/views/widget/root_view.h ('K') | « ui/views/widget/root_view.h ('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/root_view.h" 5 #include "ui/views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // that event type has been refactored, and then 255 // that event type has been refactored, and then
256 // eventually remove this function altogether. See 256 // eventually remove this function altogether. See
257 // crbug.com/348083. 257 // crbug.com/348083.
258 if (event->IsKeyEvent()) 258 if (event->IsKeyEvent())
259 return EventProcessor::OnEventFromSource(event); 259 return EventProcessor::OnEventFromSource(event);
260 else if (event->IsScrollEvent()) 260 else if (event->IsScrollEvent())
261 return EventProcessor::OnEventFromSource(event); 261 return EventProcessor::OnEventFromSource(event);
262 else if (event->IsTouchEvent()) 262 else if (event->IsTouchEvent())
263 NOTREACHED() << "Touch events should not be sent to RootView."; 263 NOTREACHED() << "Touch events should not be sent to RootView.";
264 else if (event->IsGestureEvent()) 264 else if (event->IsGestureEvent())
265 DispatchGestureEvent(static_cast<ui::GestureEvent*>(event)); 265 DispatchGestureEvent(event->AsGestureEvent());
266 else if (event->IsMouseEvent()) 266 else if (event->IsMouseEvent())
267 NOTREACHED() << "Should not be called with a MouseEvent."; 267 NOTREACHED() << "Should not be called with a MouseEvent.";
268 else 268 else
269 NOTREACHED() << "Invalid event type."; 269 NOTREACHED() << "Invalid event type.";
270 270
271 return DispatchDetails(); 271 return DispatchDetails();
272 } 272 }
273 273
274 //////////////////////////////////////////////////////////////////////////////// 274 ////////////////////////////////////////////////////////////////////////////////
275 // RootView, View overrides: 275 // RootView, View overrides:
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 808
809 #ifndef NDEBUG 809 #ifndef NDEBUG
810 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); 810 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_));
811 #endif 811 #endif
812 812
813 return details; 813 return details;
814 } 814 }
815 815
816 } // namespace internal 816 } // namespace internal
817 } // namespace views 817 } // namespace views
OLDNEW
« ui/views/widget/root_view.h ('K') | « ui/views/widget/root_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698