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

Unified Diff: content/public/browser/web_contents_view_delegate.h

Issue 351683002: Adds link disambiguation popup support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: attempt to fix athena build Created 6 years, 3 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
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents_view_delegate.h
diff --git a/content/public/browser/web_contents_view_delegate.h b/content/public/browser/web_contents_view_delegate.h
index 5a859b2230fd81f80df2814b3efc6a881435f1e9..fa41b9a69ee645d53b9a90ace7316504fbedafd4 100644
--- a/content/public/browser/web_contents_view_delegate.h
+++ b/content/public/browser/web_contents_view_delegate.h
@@ -9,7 +9,10 @@
#import <Cocoa/Cocoa.h>
#endif
+#include "base/callback.h"
#include "content/common/content_export.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/native_widget_types.h"
#if defined(__OBJC__)
@protocol RenderWidgetHostViewMacDelegate;
@@ -19,6 +22,11 @@ namespace gfx {
class Size;
}
+namespace ui {
+class GestureEvent;
+class MouseEvent;
+}
+
namespace content {
class RenderFrameHost;
class RenderWidgetHost;
@@ -47,6 +55,26 @@ class CONTENT_EXPORT WebContentsViewDelegate {
virtual void TakeFocus(bool reverse);
virtual void SizeChanged(const gfx::Size& size);
+#if defined(TOOLKIT_VIEWS)
+ // Shows a popup window containing the |zoomed_bitmap| of web content with
+ // more than one link, allowing the user to more easily select which link
+ // they were trying to touch. |target_rect| is the rectangle in DIPs in the
+ // coordinate system of |content| that has been scaled up in |zoomed_bitmap|.
+ // Should the popup receive any gesture events they should be translated back
+ // to the coordinate system of |content| and then provided to the |callback|
+ // for forwarding on to the original scale web content.
+ virtual void ShowDisambiguationPopup(
+ const gfx::Rect& target_rect,
+ const SkBitmap& zoomed_bitmap,
+ const gfx::NativeView content,
+ const base::Callback<void(ui::GestureEvent*)>& gesture_cb,
+ const base::Callback<void(ui::MouseEvent*)>& mouse_cb) = 0;
+
+ // Hides the link disambiguation popup window if it is showing, otherwise does
+ // nothing.
+ virtual void HideDisambiguationPopup() = 0;
+#endif
+
// Returns a newly-created delegate for the RenderWidgetHostViewMac, to handle
// events on the responder chain.
#if defined(__OBJC__)
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698