Chromium Code Reviews| Index: chrome/browser/renderer_host/render_widget_host_view_views.cc |
| diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc |
| index 858547cf20c2eb50313eef8bbfd1e5a81c73d19c..a5ca9766f487f123954be10c0d93b49c62c0ec04 100644 |
| --- a/chrome/browser/renderer_host/render_widget_host_view_views.cc |
| +++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc |
| @@ -87,7 +87,9 @@ RenderWidgetHostViewViews::RenderWidgetHostViewViews(RenderWidgetHost* host) |
| visually_deemphasized_(false), |
| touch_event_(), |
| text_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
| - has_composition_text_(false) { |
| + has_composition_text_(false), |
| + ALLOW_THIS_IN_INITIALIZER_LIST(touch_selection_controller_( |
| + views::TouchSelectionController::create(this))) { |
| set_focusable(true); |
| host_->SetView(this); |
| @@ -304,9 +306,13 @@ void RenderWidgetHostViewViews::SetTooltipText(const std::wstring& tip) { |
| } |
| void RenderWidgetHostViewViews::SelectionChanged(const std::string& text, |
| - const ui::Range& range) { |
| + const ui::Range& range, |
| + const gfx::Point& start, |
| + const gfx::Point& end) { |
| // TODO(anicolao): deal with the clipboard without GTK |
| NOTIMPLEMENTED(); |
| + if (touch_selection_controller_.get()) |
| + touch_selection_controller_->SelectionChanged(start, end); |
| } |
| void RenderWidgetHostViewViews::ShowingContextMenu(bool showing) { |
| @@ -329,6 +335,34 @@ void RenderWidgetHostViewViews::SetVisuallyDeemphasized( |
| // TODO(anicolao) |
| } |
| +void RenderWidgetHostViewViews::SelectRect(const gfx::Point& start, |
| + const gfx::Point& end) { |
| + if (host_) |
| + host_->Send(new ViewMsg_SelectRect(host_->routing_id(), start, end)); |
|
darin (slow to review)
2011/08/04 16:34:57
this IPC doesn't make sense. the DOM may have cha
varunjain
2011/08/04 16:54:58
how does it matter if the DOM has changed? all thi
|
| +} |
| + |
| +bool RenderWidgetHostViewViews::IsCommandIdChecked(int command_id) const { |
| + // TODO(varunjain): implement this and other menu delegate methods. |
| + NOTREACHED(); |
| + return true; |
| +} |
| + |
| +bool RenderWidgetHostViewViews::IsCommandIdEnabled(int command_id) const { |
| + NOTREACHED(); |
| + return true; |
| +} |
| + |
| +bool RenderWidgetHostViewViews::GetAcceleratorForCommandId( |
| + int command_id, |
| + ui::Accelerator* accelerator) { |
| + NOTREACHED(); |
| + return true; |
| +} |
| + |
| +void RenderWidgetHostViewViews::ExecuteCommand(int command_id) { |
| + NOTREACHED(); |
| +} |
| + |
| std::string RenderWidgetHostViewViews::GetClassName() const { |
| return kViewClassName; |
| } |