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

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

Issue 859973003: Touch emulator: enables double tap support for pages similar to Chrome on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved to dip_util, renamed to IsMobileOptimizedFrame Created 5 years, 11 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/dip_util.h
diff --git a/content/browser/renderer_host/dip_util.h b/content/browser/renderer_host/dip_util.h
index 4da0012f7c84c8cc61ec0267aa8424c6952f3670..c079be271113af6a379c3a35dd1a8c0943cac046 100644
--- a/content/browser/renderer_host/dip_util.h
+++ b/content/browser/renderer_host/dip_util.h
@@ -7,6 +7,10 @@
#include "content/common/content_export.h"
+namespace cc {
+class CompositorFrameMetadata;
+}
+
namespace gfx {
class Point;
class Rect;
@@ -29,6 +33,15 @@ CONTENT_EXPORT gfx::Size ConvertViewSizeToPixel(
CONTENT_EXPORT gfx::Rect ConvertViewRectToPixel(
const RenderWidgetHostView* view, const gfx::Rect& rect_in_dip);
+// Decides whether to enable/disable double tap zoom for a page.
+// By default returns |true|, except for the following cases:
+// - pages that have a width=device-width or narrower viewport
+// (indicating that this is a mobile-optimized or responsive
+// web design, so text will be legible without zooming);
+// - pages that prevent zooming in or out.
+CONTENT_EXPORT bool IsMobileOptimizedFrame(
+ const cc::CompositorFrameMetadata& frame_metadata);
+
} // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_DIP_UTIL_H_
« no previous file with comments | « no previous file | content/browser/renderer_host/dip_util.cc » ('j') | content/browser/renderer_host/input/touch_emulator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698