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

Side by Side Diff: chrome/browser/ui/autofill/popup_view_common.h

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nit Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_POPUP_VIEW_COMMON_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_POPUP_VIEW_COMMON_H_
7
8 #include "base/macros.h"
9 #include "ui/gfx/native_widget_types.h"
10
11 namespace gfx {
12 class Display;
13 class Point;
14 class Rect;
15 }
16
17 namespace autofill {
18
19 // Provides utility functions for popup-style views.
20 class PopupViewCommon {
21 public:
22 // Returns the bounds that the popup should be placed at, given the desired
23 // width and height. By default this places the popup below |element_bounds|
24 // but it will be placed above if there isn't enough space.
25 gfx::Rect CalculatePopupBounds(int desired_width,
26 int desired_height,
27 const gfx::Rect& element_bounds,
28 gfx::NativeView container_view,
29 bool is_rtl);
30
31 protected:
32 // A helper function to get the display closest to the given point (virtual
33 // for testing).
34 virtual gfx::Display GetDisplayNearestPoint(const gfx::Point& point,
35 gfx::NativeView container_view);
36 };
37
38 } // namespace autofill
39
40 #endif // CHROME_BROWSER_UI_AUTOFILL_POPUP_VIEW_COMMON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/popup_controller_common_unittest.cc ('k') | chrome/browser/ui/autofill/popup_view_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698