| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { | 129 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { |
| 130 return showing_context_menu_; | 130 return showing_context_menu_; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { | 133 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { |
| 134 DCHECK_NE(showing_context_menu_, showing); | 134 DCHECK_NE(showing_context_menu_, showing); |
| 135 showing_context_menu_ = showing; | 135 showing_context_menu_ = showing; |
| 136 } | 136 } |
| 137 | 137 |
| 138 base::string16 RenderWidgetHostViewBase::GetSelectedText() const { | |
| 139 if (!selection_range_.IsValid()) | |
| 140 return base::string16(); | |
| 141 return selection_text_.substr( | |
| 142 selection_range_.GetMin() - selection_text_offset_, | |
| 143 selection_range_.length()); | |
| 144 } | |
| 145 | |
| 146 bool RenderWidgetHostViewBase::IsMouseLocked() { | 138 bool RenderWidgetHostViewBase::IsMouseLocked() { |
| 147 return mouse_locked_; | 139 return mouse_locked_; |
| 148 } | 140 } |
| 149 | 141 |
| 150 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( | 142 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( |
| 151 const blink::WebInputEvent& input_event) { | 143 const blink::WebInputEvent& input_event) { |
| 152 // By default, input events are simply forwarded to the renderer. | 144 // By default, input events are simply forwarded to the renderer. |
| 153 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 145 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 154 } | 146 } |
| 155 | 147 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 458 |
| 467 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 459 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 468 return false; | 460 return false; |
| 469 } | 461 } |
| 470 | 462 |
| 471 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 463 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 472 return cc::SurfaceId(); | 464 return cc::SurfaceId(); |
| 473 } | 465 } |
| 474 | 466 |
| 475 } // namespace content | 467 } // namespace content |
| OLD | NEW |