| OLD | NEW |
| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/browser/renderer_host/backing_store_skia.h" | 10 #include "content/browser/renderer_host/backing_store_skia.h" |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 } else { | 914 } else { |
| 915 NativeWebKeyboardEvent webkit_event(event); | 915 NativeWebKeyboardEvent webkit_event(event); |
| 916 host_->ForwardKeyboardEvent(webkit_event); | 916 host_->ForwardKeyboardEvent(webkit_event); |
| 917 } | 917 } |
| 918 } | 918 } |
| 919 return true; | 919 return true; |
| 920 } | 920 } |
| 921 | 921 |
| 922 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { | 922 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { |
| 923 if (mouse_locked_) | 923 if (mouse_locked_) |
| 924 return aura::kCursorNone; | 924 return ui::kCursorNone; |
| 925 return current_cursor_.GetNativeCursor(); | 925 return current_cursor_.GetNativeCursor(); |
| 926 } | 926 } |
| 927 | 927 |
| 928 int RenderWidgetHostViewAura::GetNonClientComponent( | 928 int RenderWidgetHostViewAura::GetNonClientComponent( |
| 929 const gfx::Point& point) const { | 929 const gfx::Point& point) const { |
| 930 return HTCLIENT; | 930 return HTCLIENT; |
| 931 } | 931 } |
| 932 | 932 |
| 933 bool RenderWidgetHostViewAura::OnMouseEvent(aura::MouseEvent* event) { | 933 bool RenderWidgetHostViewAura::OnMouseEvent(aura::MouseEvent* event) { |
| 934 if (mouse_locked_) { | 934 if (mouse_locked_) { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { | 1123 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { |
| 1124 const gfx::Point screen_point = gfx::Screen::GetCursorScreenPoint(); | 1124 const gfx::Point screen_point = gfx::Screen::GetCursorScreenPoint(); |
| 1125 aura::RootWindow* root_window = window_->GetRootWindow(); | 1125 aura::RootWindow* root_window = window_->GetRootWindow(); |
| 1126 if (!root_window) | 1126 if (!root_window) |
| 1127 return; | 1127 return; |
| 1128 | 1128 |
| 1129 if (root_window->GetEventHandlerForPoint(screen_point) != window_) | 1129 if (root_window->GetEventHandlerForPoint(screen_point) != window_) |
| 1130 return; | 1130 return; |
| 1131 | 1131 |
| 1132 gfx::NativeCursor cursor = current_cursor_.GetNativeCursor(); | 1132 gfx::NativeCursor cursor = current_cursor_.GetNativeCursor(); |
| 1133 if (is_loading_ && cursor == aura::kCursorPointer) | 1133 if (is_loading_ && cursor == ui::kCursorPointer) |
| 1134 cursor = aura::kCursorProgress; | 1134 cursor = ui::kCursorProgress; |
| 1135 | 1135 |
| 1136 root_window->SetCursor(cursor); | 1136 root_window->SetCursor(cursor); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { | 1139 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { |
| 1140 aura::RootWindow* root_window = window_->GetRootWindow(); | 1140 aura::RootWindow* root_window = window_->GetRootWindow(); |
| 1141 return root_window->GetProperty(aura::client::kRootWindowInputMethodKey); | 1141 return root_window->GetProperty(aura::client::kRootWindowInputMethodKey); |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 bool RenderWidgetHostViewAura::NeedsInputGrab() { | 1144 bool RenderWidgetHostViewAura::NeedsInputGrab() { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 WebKit::WebScreenInfo* results) { | 1252 WebKit::WebScreenInfo* results) { |
| 1253 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 1253 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
| 1254 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 1254 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
| 1255 results->availableRect = results->rect; | 1255 results->availableRect = results->rect; |
| 1256 // TODO(derat): Don't hardcode this? | 1256 // TODO(derat): Don't hardcode this? |
| 1257 results->depth = 24; | 1257 results->depth = 24; |
| 1258 results->depthPerComponent = 8; | 1258 results->depthPerComponent = 8; |
| 1259 results->verticalDPI = 96; | 1259 results->verticalDPI = 96; |
| 1260 results->horizontalDPI = 96; | 1260 results->horizontalDPI = 96; |
| 1261 } | 1261 } |
| OLD | NEW |