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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 12321005: Enable touch based selection and editing for webpages behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 10 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: content/browser/renderer_host/render_widget_host_view_aura.h
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 2bca8389ad1d3b7ea68ecf606757788d3de175f6..5c4de49fa66c54afdf8c70c77dc6709c3e5c45d6 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -24,6 +24,7 @@
#include "ui/aura/root_window_observer.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/ime/text_input_client.h"
+#include "ui/base/touch/touch_editing_controller.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_observer.h"
#include "ui/gfx/display_observer.h"
@@ -61,7 +62,8 @@ class RenderWidgetHostViewAura
public aura::client::ActivationChangeObserver,
public aura::client::FocusChangeObserver,
public ImageTransportFactoryObserver,
- public base::SupportsWeakPtr<RenderWidgetHostViewAura> {
+ public base::SupportsWeakPtr<RenderWidgetHostViewAura>,
+ public ui::TouchEditable {
public:
// Used to notify whenever the paint-content of the view changes.
class PaintObserver {
@@ -139,6 +141,7 @@ class RenderWidgetHostViewAura
const ui::Range& range) OVERRIDE;
virtual void SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE;
+ virtual void TouchEditingHandlesVisibilityChanged(bool visible) OVERRIDE;
virtual void ScrollOffsetChanged() OVERRIDE;
virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
virtual void CopyFromCompositingSurface(
@@ -288,6 +291,23 @@ class RenderWidgetHostViewAura
// Overridden from ImageTransportFactoryObserver:
virtual void OnLostResources() OVERRIDE;
+ // Overridden from ui::TouchEditable:
piman 2013/02/22 02:43:04 I think all this should be a tear-off class. RWVHA
varunjain 2013/02/28 20:28:19 Done.
+ virtual void SelectRect(const gfx::Point& start,
+ const gfx::Point& end) OVERRIDE;
+ virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) OVERRIDE;
+ virtual gfx::Rect GetBounds() OVERRIDE;
+ virtual gfx::NativeView GetNativeView() OVERRIDE;
+ virtual void ConvertPointToScreen(gfx::Point* point) OVERRIDE;
+ virtual void ConvertPointFromScreen(gfx::Point* point) OVERRIDE;
+ virtual bool DrawsHandles() OVERRIDE;
+ virtual void OpenContextMenu(const gfx::Point anchor) OVERRIDE;
+ 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;
+
virtual ~RenderWidgetHostViewAura();
void UpdateCursorIfOverSelf();
@@ -510,6 +530,8 @@ class RenderWidgetHostViewAura
// when it is being destroyed.
PaintObserver* paint_observer_;
+ scoped_ptr<ui::TouchSelectionController> touch_selection_controller_;
+
#if defined(OS_WIN)
scoped_ptr<TransientWindowObserver> transient_observer_;

Powered by Google App Engine
This is Rietveld 408576698