| 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" |
| 11 #include "content/public/browser/native_web_keyboard_event.h" | 11 #include "content/public/browser/native_web_keyboard_event.h" |
| 12 #include "content/common/gpu/gpu_messages.h" | 12 #include "content/common/gpu/gpu_messages.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| 15 #include "ui/aura/client/aura_constants.h" | 15 #include "ui/aura/client/aura_constants.h" |
| 16 #include "ui/aura/client/tooltip_client.h" |
| 16 #include "ui/aura/desktop.h" | 17 #include "ui/aura/desktop.h" |
| 17 #include "ui/aura/event.h" | 18 #include "ui/aura/event.h" |
| 18 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 19 #include "ui/aura/window_types.h" | 20 #include "ui/aura/window_types.h" |
| 20 #include "ui/base/hit_test.h" | 21 #include "ui/base/hit_test.h" |
| 21 #include "ui/base/ui_base_types.h" | 22 #include "ui/base/ui_base_types.h" |
| 22 #include "ui/gfx/canvas.h" | 23 #include "ui/gfx/canvas.h" |
| 23 #include "ui/gfx/compositor/layer.h" | 24 #include "ui/gfx/compositor/layer.h" |
| 24 #include "ui/gfx/screen.h" | 25 #include "ui/gfx/screen.h" |
| 25 | 26 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 UpdateCursorIfOverSelf(); | 263 UpdateCursorIfOverSelf(); |
| 263 Destroy(); | 264 Destroy(); |
| 264 } | 265 } |
| 265 | 266 |
| 266 void RenderWidgetHostViewAura::Destroy() { | 267 void RenderWidgetHostViewAura::Destroy() { |
| 267 delete window_; | 268 delete window_; |
| 268 } | 269 } |
| 269 | 270 |
| 270 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { | 271 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { |
| 271 tooltip_ = tooltip_text; | 272 tooltip_ = tooltip_text; |
| 273 void* property = aura::Desktop::GetInstance()->GetProperty( |
| 274 aura::kDesktopTooltipClientKey); |
| 275 if (property) { |
| 276 aura::TooltipClient* tc = static_cast<aura::TooltipClient*>(property); |
| 277 tc->UpdateTooltip(window_); |
| 278 } |
| 272 } | 279 } |
| 273 | 280 |
| 274 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( | 281 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( |
| 275 const gfx::Size& size) { | 282 const gfx::Size& size) { |
| 276 return new BackingStoreSkia(host_, size); | 283 return new BackingStoreSkia(host_, size); |
| 277 } | 284 } |
| 278 | 285 |
| 279 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { | 286 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { |
| 280 UpdateExternalTexture(); | 287 UpdateExternalTexture(); |
| 281 } | 288 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 // static | 611 // static |
| 605 void RenderWidgetHostView::GetDefaultScreenInfo( | 612 void RenderWidgetHostView::GetDefaultScreenInfo( |
| 606 WebKit::WebScreenInfo* results) { | 613 WebKit::WebScreenInfo* results) { |
| 607 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 614 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
| 608 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 615 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
| 609 results->availableRect = results->rect; | 616 results->availableRect = results->rect; |
| 610 // TODO(derat): Don't hardcode this? | 617 // TODO(derat): Don't hardcode this? |
| 611 results->depth = 24; | 618 results->depth = 24; |
| 612 results->depthPerComponent = 8; | 619 results->depthPerComponent = 8; |
| 613 } | 620 } |
| OLD | NEW |