| 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 "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 void RenderWidgetHostViewBase::SetBackground(const SkBitmap& background) { | 45 void RenderWidgetHostViewBase::SetBackground(const SkBitmap& background) { |
| 46 background_ = background; | 46 background_ = background; |
| 47 } | 47 } |
| 48 | 48 |
| 49 const SkBitmap& RenderWidgetHostViewBase::GetBackground() { | 49 const SkBitmap& RenderWidgetHostViewBase::GetBackground() { |
| 50 return background_; | 50 return background_; |
| 51 } | 51 } |
| 52 | 52 |
| 53 BrowserAccessibilityManager* | |
| 54 RenderWidgetHostViewBase::GetBrowserAccessibilityManager() const { | |
| 55 return browser_accessibility_manager_.get(); | |
| 56 } | |
| 57 | |
| 58 void RenderWidgetHostViewBase::SelectionChanged(const string16& text, | 53 void RenderWidgetHostViewBase::SelectionChanged(const string16& text, |
| 59 size_t offset, | 54 size_t offset, |
| 60 const ui::Range& range) { | 55 const ui::Range& range) { |
| 61 selection_text_ = text; | 56 selection_text_ = text; |
| 62 selection_text_offset_ = offset; | 57 selection_text_offset_ = offset; |
| 63 selection_range_.set_start(range.start()); | 58 selection_range_.set_start(range.start()); |
| 64 selection_range_.set_end(range.end()); | 59 selection_range_.set_end(range.end()); |
| 65 } | 60 } |
| 66 | 61 |
| 67 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { | 62 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { |
| 68 return showing_context_menu_; | 63 return showing_context_menu_; |
| 69 } | 64 } |
| 70 | 65 |
| 71 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { | 66 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { |
| 72 DCHECK_NE(showing_context_menu_, showing); | 67 DCHECK_NE(showing_context_menu_, showing); |
| 73 showing_context_menu_ = showing; | 68 showing_context_menu_ = showing; |
| 74 } | 69 } |
| 75 | 70 |
| 76 bool RenderWidgetHostViewBase::IsMouseLocked() { | 71 bool RenderWidgetHostViewBase::IsMouseLocked() { |
| 77 return mouse_locked_; | 72 return mouse_locked_; |
| 78 } | 73 } |
| 79 | 74 |
| 75 void RenderWidgetHostViewBase::UnhandledWheelEvent( |
| 76 const WebKit::WebMouseWheelEvent& event) { |
| 77 // Most implementations don't need to do anything here. |
| 78 } |
| 79 |
| 80 void RenderWidgetHostViewBase::SetPopupType(WebKit::WebPopupType popup_type) { | 80 void RenderWidgetHostViewBase::SetPopupType(WebKit::WebPopupType popup_type) { |
| 81 popup_type_ = popup_type; | 81 popup_type_ = popup_type; |
| 82 } | 82 } |
| 83 | 83 |
| 84 WebKit::WebPopupType RenderWidgetHostViewBase::GetPopupType() { | 84 WebKit::WebPopupType RenderWidgetHostViewBase::GetPopupType() { |
| 85 return popup_type_; | 85 return popup_type_; |
| 86 } | 86 } |
| 87 | 87 |
| 88 BrowserAccessibilityManager* |
| 89 RenderWidgetHostViewBase::GetBrowserAccessibilityManager() const { |
| 90 return browser_accessibility_manager_.get(); |
| 91 } |
| 92 |
| 88 void RenderWidgetHostViewBase::SetBrowserAccessibilityManager( | 93 void RenderWidgetHostViewBase::SetBrowserAccessibilityManager( |
| 89 BrowserAccessibilityManager* manager) { | 94 BrowserAccessibilityManager* manager) { |
| 90 browser_accessibility_manager_.reset(manager); | 95 browser_accessibility_manager_.reset(manager); |
| 91 } | 96 } |
| 92 | 97 |
| 93 } // namespace content | 98 } // namespace content |
| OLD | NEW |