Refactor management of overview window copy lifetime into a separate class.
[chromium-blink-merge.git] / content / renderer / disambiguation_popup_helper.h
blob535683d691a083849f273ea26258b4a79a50a110
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_
6 #define CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_
8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/platform/WebVector.h"
11 namespace gfx {
12 class Rect;
13 class Size;
16 namespace WebKit {
17 struct WebRect;
20 namespace content {
22 // Contains functions to calculate proper scaling factor and popup size
23 class DisambiguationPopupHelper {
24 public:
25 CONTENT_EXPORT static float ComputeZoomAreaAndScaleFactor(
26 const gfx::Rect& tap_rect,
27 const WebKit::WebVector<WebKit::WebRect>& target_rects,
28 const gfx::Size& screen_size,
29 const gfx::Size& visible_content_size,
30 float total_scale,
31 gfx::Rect* zoom_rect);
34 } // namespace content
36 #endif // CONTENT_RENDERER_DISAMBIGUATION_POPUP_HELPER_H_