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

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

Issue 8907005: Add support for new scroll valuators coming from CMT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review nits Created 9 years 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
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aura.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/backing_store_skia.h" 8 #include "content/browser/renderer_host/backing_store_skia.h"
9 #include "content/browser/renderer_host/render_widget_host.h" 9 #include "content/browser/renderer_host/render_widget_host.h"
10 #include "content/browser/renderer_host/web_input_event_aura.h" 10 #include "content/browser/renderer_host/web_input_event_aura.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 499 }
500 500
501 int RenderWidgetHostViewAura::GetNonClientComponent( 501 int RenderWidgetHostViewAura::GetNonClientComponent(
502 const gfx::Point& point) const { 502 const gfx::Point& point) const {
503 return HTCLIENT; 503 return HTCLIENT;
504 } 504 }
505 505
506 bool RenderWidgetHostViewAura::OnMouseEvent(aura::MouseEvent* event) { 506 bool RenderWidgetHostViewAura::OnMouseEvent(aura::MouseEvent* event) {
507 if (event->type() == ui::ET_MOUSEWHEEL) 507 if (event->type() == ui::ET_MOUSEWHEEL)
508 host_->ForwardWheelEvent(content::MakeWebMouseWheelEvent(event)); 508 host_->ForwardWheelEvent(content::MakeWebMouseWheelEvent(event));
509 else if (event->type() == ui::ET_SCROLL)
510 host_->ForwardWheelEvent(
511 content::MakeWebMouseWheelEvent(
512 static_cast<aura::ScrollEvent*>(event)));
509 else if (CanRendererHandleEvent(event->native_event())) 513 else if (CanRendererHandleEvent(event->native_event()))
510 host_->ForwardMouseEvent(content::MakeWebMouseEvent(event)); 514 host_->ForwardMouseEvent(content::MakeWebMouseEvent(event));
511 515
512 switch (event->type()) { 516 switch (event->type()) {
513 case ui::ET_MOUSE_PRESSED: 517 case ui::ET_MOUSE_PRESSED:
514 window_->SetCapture(); 518 window_->SetCapture();
515 break; 519 break;
516 case ui::ET_MOUSE_RELEASED: 520 case ui::ET_MOUSE_RELEASED:
517 window_->ReleaseCapture(); 521 window_->ReleaseCapture();
518 break; 522 break;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 // static 631 // static
628 void RenderWidgetHostView::GetDefaultScreenInfo( 632 void RenderWidgetHostView::GetDefaultScreenInfo(
629 WebKit::WebScreenInfo* results) { 633 WebKit::WebScreenInfo* results) {
630 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 634 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
631 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 635 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
632 results->availableRect = results->rect; 636 results->availableRect = results->rect;
633 // TODO(derat): Don't hardcode this? 637 // TODO(derat): Don't hardcode this?
634 results->depth = 24; 638 results->depth = 24;
635 results->depthPerComponent = 8; 639 results->depthPerComponent = 8;
636 } 640 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698