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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 break; | 515 break; |
516 case ui::ET_MOUSE_RELEASED: | 516 case ui::ET_MOUSE_RELEASED: |
517 window_->ReleaseCapture(); | 517 window_->ReleaseCapture(); |
518 break; | 518 break; |
519 default: | 519 default: |
520 break; | 520 break; |
521 } | 521 } |
522 | 522 |
523 // Needed to propagate mouse event to native_tab_contents_view_aura. | 523 // Needed to propagate mouse event to native_tab_contents_view_aura. |
524 // TODO(pkotwicz): Find a better way of doing this. | 524 // TODO(pkotwicz): Find a better way of doing this. |
525 window_->parent()->delegate()->OnMouseEvent(event); | 525 if (window_->parent()->delegate()) |
| 526 window_->parent()->delegate()->OnMouseEvent(event); |
526 | 527 |
527 // Return true so that we receive released/drag events. | 528 // Return true so that we receive released/drag events. |
528 return true; | 529 return true; |
529 } | 530 } |
530 | 531 |
531 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( | 532 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( |
532 aura::TouchEvent* event) { | 533 aura::TouchEvent* event) { |
533 // Update the touch event first. | 534 // Update the touch event first. |
534 WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event, | 535 WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event, |
535 &touch_event_); | 536 &touch_event_); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 // static | 628 // static |
628 void RenderWidgetHostView::GetDefaultScreenInfo( | 629 void RenderWidgetHostView::GetDefaultScreenInfo( |
629 WebKit::WebScreenInfo* results) { | 630 WebKit::WebScreenInfo* results) { |
630 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 631 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
631 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 632 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
632 results->availableRect = results->rect; | 633 results->availableRect = results->rect; |
633 // TODO(derat): Don't hardcode this? | 634 // TODO(derat): Don't hardcode this? |
634 results->depth = 24; | 635 results->depth = 24; |
635 results->depthPerComponent = 8; | 636 results->depthPerComponent = 8; |
636 } | 637 } |
OLD | NEW |