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

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

Issue 9463003: aura-x11: Add custom web cursor support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: x custom cursor cache Created 8 years, 10 months 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/root_window.h » ('j') | ui/aura/root_window.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 if (!root_window) 990 if (!root_window)
991 return; 991 return;
992 992
993 if (root_window->GetEventHandlerForPoint(screen_point) != window_) 993 if (root_window->GetEventHandlerForPoint(screen_point) != window_)
994 return; 994 return;
995 995
996 gfx::NativeCursor cursor = current_cursor_.GetNativeCursor(); 996 gfx::NativeCursor cursor = current_cursor_.GetNativeCursor();
997 if (is_loading_ && cursor == aura::kCursorPointer) 997 if (is_loading_ && cursor == aura::kCursorPointer)
998 cursor = aura::kCursorProgress; 998 cursor = aura::kCursorProgress;
999 999
1000 root_window->SetCursor(cursor); 1000 if (cursor == aura::kCursorCustom)
1001 root_window->SetCustomCursor(current_cursor_.GetPlatformCursor());
1002 else
1003 root_window->SetCursor(cursor);
1001 } 1004 }
1002 1005
1003 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { 1006 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const {
1004 aura::RootWindow* root_window = window_->GetRootWindow(); 1007 aura::RootWindow* root_window = window_->GetRootWindow();
1005 return root_window->GetProperty(aura::client::kRootWindowInputMethodKey); 1008 return root_window->GetProperty(aura::client::kRootWindowInputMethodKey);
1006 } 1009 }
1007 1010
1008 bool RenderWidgetHostViewAura::NeedsInputGrab() { 1011 bool RenderWidgetHostViewAura::NeedsInputGrab() {
1009 return popup_type_ == WebKit::WebPopupTypeSelect; 1012 return popup_type_ == WebKit::WebPopupTypeSelect;
1010 } 1013 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 WebKit::WebScreenInfo* results) { 1096 WebKit::WebScreenInfo* results) {
1094 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 1097 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
1095 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 1098 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
1096 results->availableRect = results->rect; 1099 results->availableRect = results->rect;
1097 // TODO(derat): Don't hardcode this? 1100 // TODO(derat): Don't hardcode this?
1098 results->depth = 24; 1101 results->depth = 24;
1099 results->depthPerComponent = 8; 1102 results->depthPerComponent = 8;
1100 results->verticalDPI = 96; 1103 results->verticalDPI = 96;
1101 results->horizontalDPI = 96; 1104 results->horizontalDPI = 96;
1102 } 1105 }
OLDNEW
« no previous file with comments | « no previous file | ui/aura/root_window.h » ('j') | ui/aura/root_window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698