| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 manager = BrowserAccessibilityManager::Create( | 1206 manager = BrowserAccessibilityManager::Create( |
| 1207 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 1207 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
| 1208 #endif | 1208 #endif |
| 1209 return manager; | 1209 return manager; |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 gfx::GLSurfaceHandle RenderWidgetHostViewAura::GetCompositingSurface() { | 1212 gfx::GLSurfaceHandle RenderWidgetHostViewAura::GetCompositingSurface() { |
| 1213 return ImageTransportFactory::GetInstance()->GetSharedSurfaceHandle(); | 1213 return ImageTransportFactory::GetInstance()->GetSharedSurfaceHandle(); |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 #if defined(OS_WIN) |
| 1217 void RenderWidgetHostViewAura::ShowDisambiguationPopup( |
| 1218 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { |
| 1219 OnLinkDisambiguationPopupRequested(target_rect, zoomed_bitmap); |
| 1220 } |
| 1221 #endif |
| 1222 |
| 1216 bool RenderWidgetHostViewAura::LockMouse() { | 1223 bool RenderWidgetHostViewAura::LockMouse() { |
| 1217 aura::Window* root_window = window_->GetRootWindow(); | 1224 aura::Window* root_window = window_->GetRootWindow(); |
| 1218 if (!root_window) | 1225 if (!root_window) |
| 1219 return false; | 1226 return false; |
| 1220 | 1227 |
| 1221 if (mouse_locked_) | 1228 if (mouse_locked_) |
| 1222 return true; | 1229 return true; |
| 1223 | 1230 |
| 1224 mouse_locked_ = true; | 1231 mouse_locked_ = true; |
| 1225 #if !defined(OS_WIN) | 1232 #if !defined(OS_WIN) |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 void RenderWidgetHostViewAura::OnWindowTargetVisibilityChanged(bool visible) { | 1676 void RenderWidgetHostViewAura::OnWindowTargetVisibilityChanged(bool visible) { |
| 1670 } | 1677 } |
| 1671 | 1678 |
| 1672 bool RenderWidgetHostViewAura::HasHitTestMask() const { | 1679 bool RenderWidgetHostViewAura::HasHitTestMask() const { |
| 1673 return false; | 1680 return false; |
| 1674 } | 1681 } |
| 1675 | 1682 |
| 1676 void RenderWidgetHostViewAura::GetHitTestMask(gfx::Path* mask) const { | 1683 void RenderWidgetHostViewAura::GetHitTestMask(gfx::Path* mask) const { |
| 1677 } | 1684 } |
| 1678 | 1685 |
| 1686 void RenderWidgetHostViewAura::OnLinkDisambiguationPopupRequested( |
| 1687 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { |
| 1688 if (window_->parent()->delegate()) { |
| 1689 window_->parent()->delegate()->OnLinkDisambiguationPopupRequested( |
| 1690 target_rect, zoomed_bitmap); |
| 1691 } |
| 1692 } |
| 1693 |
| 1694 |
| 1679 //////////////////////////////////////////////////////////////////////////////// | 1695 //////////////////////////////////////////////////////////////////////////////// |
| 1680 // RenderWidgetHostViewAura, ui::EventHandler implementation: | 1696 // RenderWidgetHostViewAura, ui::EventHandler implementation: |
| 1681 | 1697 |
| 1682 void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) { | 1698 void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) { |
| 1683 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnKeyEvent"); | 1699 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnKeyEvent"); |
| 1684 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event)) | 1700 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event)) |
| 1685 return; | 1701 return; |
| 1686 | 1702 |
| 1687 if (popup_child_host_view_ && popup_child_host_view_->NeedsInputGrab()) { | 1703 if (popup_child_host_view_ && popup_child_host_view_->NeedsInputGrab()) { |
| 1688 popup_child_host_view_->OnKeyEvent(event); | 1704 popup_child_host_view_->OnKeyEvent(event); |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 | 2502 |
| 2487 //////////////////////////////////////////////////////////////////////////////// | 2503 //////////////////////////////////////////////////////////////////////////////// |
| 2488 // RenderWidgetHostViewBase, public: | 2504 // RenderWidgetHostViewBase, public: |
| 2489 | 2505 |
| 2490 // static | 2506 // static |
| 2491 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2507 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2492 GetScreenInfoForWindow(results, NULL); | 2508 GetScreenInfoForWindow(results, NULL); |
| 2493 } | 2509 } |
| 2494 | 2510 |
| 2495 } // namespace content | 2511 } // namespace content |
| OLD | NEW |