| OLD | NEW |
| 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/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" |
| 11 #include "content/common/gpu/gpu_messages.h" | 11 #include "content/common/gpu/gpu_messages.h" |
| 12 #include "content/port/browser/render_widget_host_view_port.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| 15 #include "ui/aura/client/aura_constants.h" | 16 #include "ui/aura/client/aura_constants.h" |
| 16 #include "ui/aura/client/tooltip_client.h" | 17 #include "ui/aura/client/tooltip_client.h" |
| 17 #include "ui/aura/client/window_types.h" | 18 #include "ui/aura/client/window_types.h" |
| 18 #include "ui/aura/event.h" | 19 #include "ui/aura/event.h" |
| 19 #include "ui/aura/gestures/gesture_recognizer.h" | 20 #include "ui/aura/gestures/gesture_recognizer.h" |
| 20 #include "ui/aura/root_window.h" | 21 #include "ui/aura/root_window.h" |
| 21 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 // Don't call UpdateExternalTexture: it's possible that a new surface with | 471 // Don't call UpdateExternalTexture: it's possible that a new surface with |
| 471 // the same ID will be re-created right away, in which case we don't want to | 472 // the same ID will be re-created right away, in which case we don't want to |
| 472 // flip back and forth. Instead wait until we got the accelerated | 473 // flip back and forth. Instead wait until we got the accelerated |
| 473 // compositing deactivation. | 474 // compositing deactivation. |
| 474 } | 475 } |
| 475 image_transport_clients_.erase(surface_handle); | 476 image_transport_clients_.erase(surface_handle); |
| 476 } | 477 } |
| 477 #endif | 478 #endif |
| 478 | 479 |
| 479 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { | 480 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { |
| 480 RenderWidgetHostViewBase::SetBackground(background); | 481 content::RenderWidgetHostViewBase::SetBackground(background); |
| 481 host_->SetBackground(background); | 482 host_->SetBackground(background); |
| 482 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 483 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 483 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); | 484 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); |
| 484 #endif | 485 #endif |
| 485 } | 486 } |
| 486 | 487 |
| 487 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) { | 488 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) { |
| 488 GetDefaultScreenInfo(results); | 489 GetDefaultScreenInfo(results); |
| 489 } | 490 } |
| 490 | 491 |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 //////////////////////////////////////////////////////////////////////////////// | 1080 //////////////////////////////////////////////////////////////////////////////// |
| 1080 // RenderWidgetHostView, public: | 1081 // RenderWidgetHostView, public: |
| 1081 | 1082 |
| 1082 // static | 1083 // static |
| 1083 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( | 1084 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( |
| 1084 RenderWidgetHost* widget) { | 1085 RenderWidgetHost* widget) { |
| 1085 return new RenderWidgetHostViewAura(widget); | 1086 return new RenderWidgetHostViewAura(widget); |
| 1086 } | 1087 } |
| 1087 | 1088 |
| 1088 // static | 1089 // static |
| 1089 void RenderWidgetHostViewBase::GetDefaultScreenInfo( | 1090 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 1090 WebKit::WebScreenInfo* results) { | 1091 WebKit::WebScreenInfo* results) { |
| 1091 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 1092 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
| 1092 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 1093 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
| 1093 results->availableRect = results->rect; | 1094 results->availableRect = results->rect; |
| 1094 // TODO(derat): Don't hardcode this? | 1095 // TODO(derat): Don't hardcode this? |
| 1095 results->depth = 24; | 1096 results->depth = 24; |
| 1096 results->depthPerComponent = 8; | 1097 results->depthPerComponent = 8; |
| 1097 } | 1098 } |
| OLD | NEW |