| 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/web_input_event_aura.h" | 9 #include "content/browser/renderer_host/web_input_event_aura.h" |
| 10 #include "content/browser/renderer_host/render_widget_host.h" | 10 #include "content/browser/renderer_host/render_widget_host.h" |
| 11 #include "content/public/browser/native_web_keyboard_event.h" | 11 #include "content/public/browser/native_web_keyboard_event.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 13 #include "ui/aura/desktop.h" | 13 #include "ui/aura/desktop.h" |
| 14 #include "ui/aura/event.h" | 14 #include "ui/aura/event.h" |
| 15 #include "ui/aura/hit_test.h" | 15 #include "ui/aura/hit_test.h" |
| 16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
| 17 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
| 18 #include "ui/gfx/compositor/layer.h" |
| 18 | 19 |
| 19 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 20 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 20 #include "base/bind.h" | 21 #include "base/bind.h" |
| 21 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 22 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 22 #include "content/browser/renderer_host/accelerated_surface_container_linux.h" | 23 #include "content/browser/renderer_host/accelerated_surface_container_linux.h" |
| 23 #include "content/common/gpu/gpu_messages.h" | 24 #include "content/common/gpu/gpu_messages.h" |
| 24 #include "ui/gfx/compositor/layer.h" | |
| 25 #include "ui/gfx/gl/gl_bindings.h" | 25 #include "ui/gfx/gl/gl_bindings.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 30 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 31 void AcknowledgeSwapBuffers(int32 route_id, int gpu_host_id) { | 31 void AcknowledgeSwapBuffers(int32 route_id, int gpu_host_id) { |
| 32 // It's possible that gpu_host_id is no longer valid at this point (like if | 32 // It's possible that gpu_host_id is no longer valid at this point (like if |
| 33 // gpu process was restarted after a crash). SendToGpuHost handles this. | 33 // gpu process was restarted after a crash). SendToGpuHost handles this. |
| 34 GpuProcessHostUIShim::SendToGpuHost(gpu_host_id, | 34 GpuProcessHostUIShim::SendToGpuHost(gpu_host_id, |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 | 231 |
| 232 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease(uint64 surface_id) { | 232 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease(uint64 surface_id) { |
| 233 accelerated_surface_containers_.erase(surface_id); | 233 accelerated_surface_containers_.erase(surface_id); |
| 234 } | 234 } |
| 235 #endif | 235 #endif |
| 236 | 236 |
| 237 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { | 237 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { |
| 238 RenderWidgetHostView::SetBackground(background); | 238 RenderWidgetHostView::SetBackground(background); |
| 239 host_->SetBackground(background); | 239 host_->SetBackground(background); |
| 240 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); |
| 240 } | 241 } |
| 241 | 242 |
| 242 #if defined(OS_POSIX) | 243 #if defined(OS_POSIX) |
| 243 void RenderWidgetHostViewAura::GetDefaultScreenInfo( | 244 void RenderWidgetHostViewAura::GetDefaultScreenInfo( |
| 244 WebKit::WebScreenInfo* results) { | 245 WebKit::WebScreenInfo* results) { |
| 245 NOTIMPLEMENTED(); | 246 NOTIMPLEMENTED(); |
| 246 } | 247 } |
| 247 | 248 |
| 248 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) { | 249 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) { |
| 249 NOTIMPLEMENTED(); | 250 NOTIMPLEMENTED(); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 416 |
| 416 #if !defined(TOUCH_UI) | 417 #if !defined(TOUCH_UI) |
| 417 //////////////////////////////////////////////////////////////////////////////// | 418 //////////////////////////////////////////////////////////////////////////////// |
| 418 // RenderWidgetHostViewAura, private: | 419 // RenderWidgetHostViewAura, private: |
| 419 | 420 |
| 420 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { | 421 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { |
| 421 //NOTIMPLEMENTED(); | 422 //NOTIMPLEMENTED(); |
| 422 // TODO(beng): See RenderWidgetHostViewWin. | 423 // TODO(beng): See RenderWidgetHostViewWin. |
| 423 } | 424 } |
| 424 #endif | 425 #endif |
| OLD | NEW |