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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.h

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: AutofillPopupViewHelper 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/ui/autofill/autofill_popup_view.h" 12 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
13 #include "chrome/browser/ui/autofill/autofill_popup_view_helper.h"
12 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" 14 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h"
13 15
14 class AutofillPopupController; 16 class AutofillPopupController;
15 17
16 namespace autofill { 18 namespace autofill {
17 19
18 // Views toolkit implementation for AutofillPopupView. 20 // Views toolkit implementation for AutofillPopupView.
19 class AutofillPopupViewViews : public AutofillPopupBaseView, 21 class AutofillPopupViewViews : public AutofillPopupBaseView,
20 public AutofillPopupView { 22 public AutofillPopupView {
21 public: 23 public:
22 AutofillPopupViewViews(AutofillPopupController* controller, 24 AutofillPopupViewViews(AutofillPopupController* controller,
23 views::Widget* parent_widget); 25 views::Widget* parent_widget);
24 26
25 private: 27 private:
26 ~AutofillPopupViewViews() override; 28 ~AutofillPopupViewViews() override;
27 29
28 // AutofillPopupView implementation. 30 // AutofillPopupView implementation.
29 void Show() override; 31 void Show() override;
30 void Hide() override; 32 void Hide() override;
31 void InvalidateRow(size_t row) override; 33 void InvalidateRow(size_t row) override;
32 void UpdateBoundsAndRedrawPopup() override; 34 void UpdateBoundsAndRedrawPopup() override;
35 void UpdatePopupBounds() override;
36 int GetAvailableWidthForRow(int row, bool with_label) override;
37 int LineFromY(int y) override;
38 gfx::Rect GetPopupBounds() override;
33 39
34 // views::Views implementation 40 // views::Views implementation
35 void OnPaint(gfx::Canvas* canvas) override; 41 void OnPaint(gfx::Canvas* canvas) override;
36 42
37 // Draw the given autofill entry in |entry_rect|. 43 // Draw the given autofill entry in |entry_rect|.
38 void DrawAutofillEntry(gfx::Canvas* canvas, 44 void DrawAutofillEntry(gfx::Canvas* canvas,
39 int index, 45 int index,
40 const gfx::Rect& entry_rect); 46 const gfx::Rect& entry_rect);
41 47
48 scoped_ptr<AutofillPopupViewHelper> view_helper_;
49
42 AutofillPopupController* controller_; // Weak reference. 50 AutofillPopupController* controller_; // Weak reference.
43 51
44 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); 52 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews);
45 }; 53 };
46 54
47 } // namespace autofill 55 } // namespace autofill
48 56
49 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ 57 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698