| 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_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/browser/accessibility/browser_accessibility_manager.h" | 9 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 10 #include "content/browser/gpu/gpu_data_manager_impl.h" | 10 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 namespace content { | 28 namespace content { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 } | 32 } |
| 33 | 33 |
| 34 RenderWidgetHostViewBase::RenderWidgetHostViewBase() | 34 RenderWidgetHostViewBase::RenderWidgetHostViewBase() |
| 35 : is_fullscreen_(false), | 35 : is_fullscreen_(false), |
| 36 popup_type_(blink::kWebPopupTypeNone), | 36 popup_type_(blink::kWebPopupTypeNone), |
| 37 mouse_locked_(false), | 37 mouse_locked_(false), |
| 38 showing_context_menu_(false), | |
| 39 current_device_scale_factor_(0), | 38 current_device_scale_factor_(0), |
| 40 current_display_rotation_(display::Display::ROTATE_0), | 39 current_display_rotation_(display::Display::ROTATE_0), |
| 41 text_input_manager_(nullptr), | 40 text_input_manager_(nullptr), |
| 42 wheel_scroll_latching_enabled_(base::FeatureList::IsEnabled( | 41 wheel_scroll_latching_enabled_(base::FeatureList::IsEnabled( |
| 43 features::kTouchpadAndWheelScrollLatching)), | 42 features::kTouchpadAndWheelScrollLatching)), |
| 44 renderer_frame_number_(0), | 43 renderer_frame_number_(0), |
| 45 weak_factory_(this) {} | 44 weak_factory_(this) {} |
| 46 | 45 |
| 47 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { | 46 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { |
| 48 DCHECK(!mouse_locked_); | 47 DCHECK(!mouse_locked_); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 155 } |
| 157 | 156 |
| 158 void RenderWidgetHostViewBase::CopyFromSurfaceToVideoFrame( | 157 void RenderWidgetHostViewBase::CopyFromSurfaceToVideoFrame( |
| 159 const gfx::Rect& src_rect, | 158 const gfx::Rect& src_rect, |
| 160 scoped_refptr<media::VideoFrame> target, | 159 scoped_refptr<media::VideoFrame> target, |
| 161 const base::Callback<void(const gfx::Rect&, bool)>& callback) { | 160 const base::Callback<void(const gfx::Rect&, bool)>& callback) { |
| 162 NOTIMPLEMENTED(); | 161 NOTIMPLEMENTED(); |
| 163 callback.Run(gfx::Rect(), false); | 162 callback.Run(gfx::Rect(), false); |
| 164 } | 163 } |
| 165 | 164 |
| 166 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { | |
| 167 return showing_context_menu_; | |
| 168 } | |
| 169 | |
| 170 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { | |
| 171 DCHECK_NE(showing_context_menu_, showing); | |
| 172 showing_context_menu_ = showing; | |
| 173 } | |
| 174 | |
| 175 base::string16 RenderWidgetHostViewBase::GetSelectedText() { | 165 base::string16 RenderWidgetHostViewBase::GetSelectedText() { |
| 176 if (!GetTextInputManager()) | 166 if (!GetTextInputManager()) |
| 177 return base::string16(); | 167 return base::string16(); |
| 178 return GetTextInputManager()->GetTextSelection(this)->selected_text(); | 168 return GetTextInputManager()->GetTextSelection(this)->selected_text(); |
| 179 } | 169 } |
| 180 | 170 |
| 181 bool RenderWidgetHostViewBase::IsMouseLocked() { | 171 bool RenderWidgetHostViewBase::IsMouseLocked() { |
| 182 return mouse_locked_; | 172 return mouse_locked_; |
| 183 } | 173 } |
| 184 | 174 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 485 |
| 496 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 486 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 497 return false; | 487 return false; |
| 498 } | 488 } |
| 499 | 489 |
| 500 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 490 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 501 return cc::SurfaceId(); | 491 return cc::SurfaceId(); |
| 502 } | 492 } |
| 503 | 493 |
| 504 } // namespace content | 494 } // namespace content |
| OLD | NEW |