Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 8747022: Aura: Tooltips (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified according to comments Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | ui/aura_shell/shell_tooltip_manager.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | ui/aura_shell/shell_tooltip_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698