OLD | NEW |
---|---|
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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
501 case ui::ET_MOUSE_PRESSED: | 501 case ui::ET_MOUSE_PRESSED: |
502 window_->SetCapture(); | 502 window_->SetCapture(); |
503 break; | 503 break; |
504 case ui::ET_MOUSE_RELEASED: | 504 case ui::ET_MOUSE_RELEASED: |
505 window_->ReleaseCapture(); | 505 window_->ReleaseCapture(); |
506 break; | 506 break; |
507 default: | 507 default: |
508 break; | 508 break; |
509 } | 509 } |
510 | 510 |
511 // Return true so that we receive released/drag events. | 511 return false; |
Ben Goodger (Google)
2011/12/06 04:31:59
Was something broken by this returning true?
This
pkotwicz
2011/12/06 18:12:35
Which event handling in particular does it interfe
| |
512 return true; | |
513 } | 512 } |
514 | 513 |
515 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( | 514 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( |
516 aura::TouchEvent* event) { | 515 aura::TouchEvent* event) { |
517 // Update the touch event first. | 516 // Update the touch event first. |
518 WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event, | 517 WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event, |
519 &touch_event_); | 518 &touch_event_); |
520 | 519 |
521 // Forward the touch event only if a touch point was updated. | 520 // Forward the touch event only if a touch point was updated. |
522 if (point) { | 521 if (point) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 // static | 603 // static |
605 void RenderWidgetHostView::GetDefaultScreenInfo( | 604 void RenderWidgetHostView::GetDefaultScreenInfo( |
606 WebKit::WebScreenInfo* results) { | 605 WebKit::WebScreenInfo* results) { |
607 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 606 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
608 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 607 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
609 results->availableRect = results->rect; | 608 results->availableRect = results->rect; |
610 // TODO(derat): Don't hardcode this? | 609 // TODO(derat): Don't hardcode this? |
611 results->depth = 24; | 610 results->depth = 24; |
612 results->depthPerComponent = 8; | 611 results->depthPerComponent = 8; |
613 } | 612 } |
OLD | NEW |