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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 11047012: Wiring metro mouse events to aura viewer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 host_->ForwardWheelEvent(mouse_wheel_event); 1502 host_->ForwardWheelEvent(mouse_wheel_event);
1503 RecordAction(UserMetricsAction("TrackpadScroll")); 1503 RecordAction(UserMetricsAction("TrackpadScroll"));
1504 } else if (event->type() == ui::ET_SCROLL_FLING_START || 1504 } else if (event->type() == ui::ET_SCROLL_FLING_START ||
1505 event->type() == ui::ET_SCROLL_FLING_CANCEL) { 1505 event->type() == ui::ET_SCROLL_FLING_CANCEL) {
1506 WebKit::WebGestureEvent gesture_event = 1506 WebKit::WebGestureEvent gesture_event =
1507 MakeWebGestureEvent(static_cast<ui::ScrollEvent*>(event)); 1507 MakeWebGestureEvent(static_cast<ui::ScrollEvent*>(event));
1508 host_->ForwardGestureEvent(gesture_event); 1508 host_->ForwardGestureEvent(gesture_event);
1509 if (event->type() == ui::ET_SCROLL_FLING_START) 1509 if (event->type() == ui::ET_SCROLL_FLING_START)
1510 RecordAction(UserMetricsAction("TrackpadScrollFling")); 1510 RecordAction(UserMetricsAction("TrackpadScrollFling"));
1511 } else if (CanRendererHandleEvent(event)) { 1511 } else if (CanRendererHandleEvent(event)) {
1512 #if 0
1513 // carp, webkit is expecting a native mouse event so it dchecks in
1514 // WebInputEventFactory::mouseEvent. In other words, webkit windows code
1515 // needs to be made less windowzy.
1512 WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event); 1516 WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event);
1513 ModifyEventMovementAndCoords(&mouse_event); 1517 ModifyEventMovementAndCoords(&mouse_event);
1514 host_->ForwardMouseEvent(mouse_event); 1518 host_->ForwardMouseEvent(mouse_event);
1519 #endif
1515 } 1520 }
1516 1521
1517 switch (event->type()) { 1522 switch (event->type()) {
1518 case ui::ET_MOUSE_PRESSED: 1523 case ui::ET_MOUSE_PRESSED:
1519 window_->SetCapture(); 1524 window_->SetCapture();
1520 // Confirm existing composition text on mouse click events, to make sure 1525 // Confirm existing composition text on mouse click events, to make sure
1521 // the input caret won't be moved with an ongoing composition text. 1526 // the input caret won't be moved with an ongoing composition text.
1522 FinishImeCompositionSession(); 1527 FinishImeCompositionSession();
1523 break; 1528 break;
1524 case ui::ET_MOUSE_RELEASED: 1529 case ui::ET_MOUSE_RELEASED:
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 RenderWidgetHost* widget) { 1876 RenderWidgetHost* widget) {
1872 return new RenderWidgetHostViewAura(widget); 1877 return new RenderWidgetHostViewAura(widget);
1873 } 1878 }
1874 1879
1875 // static 1880 // static
1876 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 1881 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
1877 GetScreenInfoForWindow(results, NULL); 1882 GetScreenInfoForWindow(results, NULL);
1878 } 1883 }
1879 1884
1880 } // namespace content 1885 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698