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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 UpdateCursorIfOverSelf(); | 266 UpdateCursorIfOverSelf(); |
267 Destroy(); | 267 Destroy(); |
268 } | 268 } |
269 | 269 |
270 void RenderWidgetHostViewAura::Destroy() { | 270 void RenderWidgetHostViewAura::Destroy() { |
271 delete window_; | 271 delete window_; |
272 } | 272 } |
273 | 273 |
274 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { | 274 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { |
275 tooltip_ = tooltip_text; | 275 tooltip_ = tooltip_text; |
276 void* property = aura::Desktop::GetInstance()->GetProperty( | 276 aura::TooltipClient::UpdateTooltip(window_); |
277 aura::kDesktopTooltipClientKey); | |
278 if (property) { | |
279 aura::TooltipClient* tc = static_cast<aura::TooltipClient*>(property); | |
280 tc->UpdateTooltip(window_); | |
281 } | |
282 } | 277 } |
283 | 278 |
284 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( | 279 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( |
285 const gfx::Size& size) { | 280 const gfx::Size& size) { |
286 return new BackingStoreSkia(host_, size); | 281 return new BackingStoreSkia(host_, size); |
287 } | 282 } |
288 | 283 |
289 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { | 284 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { |
290 UpdateExternalTexture(); | 285 UpdateExternalTexture(); |
291 } | 286 } |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 // static | 607 // static |
613 void RenderWidgetHostView::GetDefaultScreenInfo( | 608 void RenderWidgetHostView::GetDefaultScreenInfo( |
614 WebKit::WebScreenInfo* results) { | 609 WebKit::WebScreenInfo* results) { |
615 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 610 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
616 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 611 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
617 results->availableRect = results->rect; | 612 results->availableRect = results->rect; |
618 // TODO(derat): Don't hardcode this? | 613 // TODO(derat): Don't hardcode this? |
619 results->depth = 24; | 614 results->depth = 24; |
620 results->depthPerComponent = 8; | 615 results->depthPerComponent = 8; |
621 } | 616 } |
OLD | NEW |