Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5209)

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_views.h

Issue 7528009: This is the exact same CL as in http://codereview.chromium.org/7570001 . (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_views.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.h b/chrome/browser/renderer_host/render_widget_host_view_views.h
index e10694ebaae4fe27ce14ecd5d8ff1bf9884f145c..715c6b72265fb9e575b00fdae47a2c50731bfaea 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.h
@@ -18,6 +18,7 @@
#include "views/controls/native/native_view_host.h"
#include "views/events/event.h"
#include "views/ime/text_input_client.h"
+#include "views/touchui/touch_selection_controller.h"
#include "views/view.h"
#include "webkit/glue/webcursor.h"
@@ -35,7 +36,7 @@ struct NativeWebKeyboardEvent;
// See comments in render_widget_host_view.h about this class and its members.
// -----------------------------------------------------------------------------
class RenderWidgetHostViewViews : public RenderWidgetHostView,
- public views::View,
+ public views::TouchSelectionClientView,
public views::TextInputClient {
public:
// Internal class name.
@@ -79,7 +80,9 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
virtual void Destroy() OVERRIDE;
virtual void SetTooltipText(const std::wstring& tooltip_text) OVERRIDE;
virtual void SelectionChanged(const std::string& text,
- const ui::Range& range) OVERRIDE;
+ const ui::Range& range,
+ const gfx::Point& start,
+ const gfx::Point& end) OVERRIDE;
virtual void ShowingContextMenu(bool showing) OVERRIDE;
virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
virtual void SetBackground(const SkBitmap& background) OVERRIDE;
@@ -98,6 +101,18 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
#endif
virtual gfx::PluginWindowHandle GetCompositingSurface() OVERRIDE;
+ // Overridden from views::TouchSelectionClientView.
+ virtual void SelectRect(const gfx::Point& start,
+ const gfx::Point& end) OVERRIDE;
+
+ // Overridden from ui::SimpleMenuModel::Delegate.
+ virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool GetAcceleratorForCommandId(
+ int command_id,
+ ui::Accelerator* accelerator) OVERRIDE;
+ virtual void ExecuteCommand(int command_id) OVERRIDE;
+
// Overridden from views::View.
virtual std::string GetClassName() const OVERRIDE;
virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE;
@@ -240,6 +255,8 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
string16 tooltip_text_;
+ scoped_ptr<views::TouchSelectionController> touch_selection_controller_;
+
#if defined(TOUCH_UI)
std::map<uint64, scoped_refptr<AcceleratedSurfaceContainerTouch> >
accelerated_surface_containers_;

Powered by Google App Engine
This is Rietveld 408576698