| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2019 bool RenderWidgetHostViewAura::OnShowContextMenu( | 2019 bool RenderWidgetHostViewAura::OnShowContextMenu( |
| 2020 const ContextMenuParams& params) { | 2020 const ContextMenuParams& params) { |
| 2021 #if defined(OS_WIN) | 2021 #if defined(OS_WIN) |
| 2022 event_handler_->SetContextMenuParams(params); | 2022 event_handler_->SetContextMenuParams(params); |
| 2023 return params.source_type != ui::MENU_SOURCE_LONG_PRESS; | 2023 return params.source_type != ui::MENU_SOURCE_LONG_PRESS; |
| 2024 #else | 2024 #else |
| 2025 return true; | 2025 return true; |
| 2026 #endif // defined(OS_WIN) | 2026 #endif // defined(OS_WIN) |
| 2027 } | 2027 } |
| 2028 | 2028 |
| 2029 float RenderWidgetHostViewAura::GetDeviceScaleFactor() const { |
| 2030 return device_scale_factor_; |
| 2031 } |
| 2032 |
| 2029 void RenderWidgetHostViewAura::SetSelectionControllerClientForTest( | 2033 void RenderWidgetHostViewAura::SetSelectionControllerClientForTest( |
| 2030 std::unique_ptr<TouchSelectionControllerClientAura> client) { | 2034 std::unique_ptr<TouchSelectionControllerClientAura> client) { |
| 2031 selection_controller_client_.swap(client); | 2035 selection_controller_client_.swap(client); |
| 2032 CreateSelectionController(); | 2036 CreateSelectionController(); |
| 2033 } | 2037 } |
| 2034 | 2038 |
| 2035 void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) { | 2039 void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) { |
| 2036 SnapToPhysicalPixelBoundary(); | 2040 SnapToPhysicalPixelBoundary(); |
| 2037 // Don't recursively call SetBounds if this bounds update is the result of | 2041 // Don't recursively call SetBounds if this bounds update is the result of |
| 2038 // a Window::SetBoundsInternal call. | 2042 // a Window::SetBoundsInternal call. |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2380 | 2384 |
| 2381 void RenderWidgetHostViewAura::SetPopupChild( | 2385 void RenderWidgetHostViewAura::SetPopupChild( |
| 2382 RenderWidgetHostViewAura* popup_child_host_view) { | 2386 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2383 popup_child_host_view_ = popup_child_host_view; | 2387 popup_child_host_view_ = popup_child_host_view; |
| 2384 event_handler_->SetPopupChild( | 2388 event_handler_->SetPopupChild( |
| 2385 popup_child_host_view, | 2389 popup_child_host_view, |
| 2386 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2390 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2387 } | 2391 } |
| 2388 | 2392 |
| 2389 } // namespace content | 2393 } // namespace content |
| OLD | NEW |