| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 UpdateCursorIfOverSelf(); | 260 UpdateCursorIfOverSelf(); |
| 260 Destroy(); | 261 Destroy(); |
| 261 } | 262 } |
| 262 | 263 |
| 263 void RenderWidgetHostViewAura::Destroy() { | 264 void RenderWidgetHostViewAura::Destroy() { |
| 264 delete window_; | 265 delete window_; |
| 265 } | 266 } |
| 266 | 267 |
| 267 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { | 268 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { |
| 268 tooltip_ = tooltip_text; | 269 tooltip_ = tooltip_text; |
| 270 void* property = aura::Desktop::GetInstance()->GetProperty( |
| 271 aura::kDesktopTooltipClientKey); |
| 272 if (property) { |
| 273 aura::TooltipClient* tc = static_cast<aura::TooltipClient*>(property); |
| 274 tc->UpdateTooltip(window_); |
| 275 } |
| 269 } | 276 } |
| 270 | 277 |
| 271 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( | 278 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( |
| 272 const gfx::Size& size) { | 279 const gfx::Size& size) { |
| 273 return new BackingStoreSkia(host_, size); | 280 return new BackingStoreSkia(host_, size); |
| 274 } | 281 } |
| 275 | 282 |
| 276 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { | 283 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { |
| 277 } | 284 } |
| 278 | 285 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 // static | 577 // static |
| 571 void RenderWidgetHostView::GetDefaultScreenInfo( | 578 void RenderWidgetHostView::GetDefaultScreenInfo( |
| 572 WebKit::WebScreenInfo* results) { | 579 WebKit::WebScreenInfo* results) { |
| 573 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 580 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
| 574 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 581 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
| 575 results->availableRect = results->rect; | 582 results->availableRect = results->rect; |
| 576 // TODO(derat): Don't hardcode this? | 583 // TODO(derat): Don't hardcode this? |
| 577 results->depth = 24; | 584 results->depth = 24; |
| 578 results->depthPerComponent = 8; | 585 results->depthPerComponent = 8; |
| 579 } | 586 } |
| OLD | NEW |