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

Unified Diff: content/renderer/disambiguation_popup_helper.h

Issue 10885004: Implement disambiguation popup (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename IPCs, move popup size calculation to helper class Created 8 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: content/renderer/disambiguation_popup_helper.h
diff --git a/content/renderer/disambiguation_popup_helper.h b/content/renderer/disambiguation_popup_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..aaf16a29d9ca17b9748a7e6cc41f2f37c040dc34
--- /dev/null
+++ b/content/renderer/disambiguation_popup_helper.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_
+#define CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_
+
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
+
+namespace gfx {
+ class Rect;
darin (slow to review) 2012/08/31 23:00:16 nit: do not indent
+ class Size;
+};
darin (slow to review) 2012/08/31 23:00:16 nit: no ';'
+
+namespace WebKit {
+ class WebRect;
darin (slow to review) 2012/08/31 23:00:16 nit: do not indent
+};
darin (slow to review) 2012/08/31 23:00:16 nit: no ';'
+
+// Contains functions to calculate proper scaling factor and popup size
+class DisambiguationPopupHelper {
+public:
+ static float ComputeZoomAreaAndScaleFactor(gfx::Rect& zoom_rect,
darin (slow to review) 2012/08/31 23:00:16 nit: move zoom_rect down to the next line: stat
+ const gfx::Rect& tap_rect,
+ const WebKit::WebVector<WebKit::WebRect>& target_rects,
+ const gfx::Size& viewport_size);
+};
+
+#endif // CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698