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

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

Issue 11308124: Hide new Autofill Popup on Main Widget Resize or Move. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 "chrome/browser/autofill/autofill_popup_view.h" 8 #include "chrome/browser/autofill/autofill_popup_view.h"
9 #include "content/public/browser/keyboard_listener.h" 9 #include "content/public/browser/keyboard_listener.h"
10 #include "ui/views/widget/widget_delegate.h" 10 #include "ui/views/widget/widget_delegate.h"
11 #include "ui/views/widget/widget_observer.h"
11 12
12 class AutofillExternalDelegateViews; 13 class AutofillExternalDelegateViews;
13 14
14 namespace content { 15 namespace content {
15 class WebContents; 16 class WebContents;
16 } 17 }
17 18
18 // The View Autofill popup implementation. 19 // The View Autofill popup implementation.
19 class AutofillPopupViewViews : public views::WidgetDelegateView, 20 class AutofillPopupViewViews : public views::WidgetDelegateView,
21 public views::WidgetObserver,
20 public AutofillPopupView, 22 public AutofillPopupView,
21 public KeyboardListener { 23 public KeyboardListener {
22 public: 24 public:
23 AutofillPopupViewViews(content::WebContents* web_contents, 25 AutofillPopupViewViews(content::WebContents* web_contents,
24 AutofillExternalDelegateViews* external_delegate); 26 AutofillExternalDelegateViews* external_delegate);
25 27
26 // AutofillPopupView implementation. 28 // AutofillPopupView implementation.
27 virtual void Hide() OVERRIDE; 29 virtual void Hide() OVERRIDE;
28 30
29 private: 31 private:
30 class AutofillPopupWidget; 32 class AutofillPopupWidget;
31 33
32 virtual ~AutofillPopupViewViews(); 34 virtual ~AutofillPopupViewViews();
33 35
34 // views:Views implementation. 36 // views:Views implementation.
35 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 37 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
36 38
39 // views::WidgetObserver implementation.
40 virtual void OnWidgetMoved(views::Widget* widget) OVERRIDE;
41 virtual void OnWidgetSizeChanged(views::Widget* widget,
42 const gfx::Size& size) OVERRIDE;
43
37 // KeyboardListener implementation. 44 // KeyboardListener implementation.
38 virtual bool HandleKeyPressEvent(ui::KeyEvent* event) OVERRIDE; 45 virtual bool HandleKeyPressEvent(ui::KeyEvent* event) OVERRIDE;
39 46
40 // AutofillPopupView implementation. 47 // AutofillPopupView implementation.
41 virtual void ShowInternal() OVERRIDE; 48 virtual void ShowInternal() OVERRIDE;
42 virtual void InvalidateRow(size_t row) OVERRIDE; 49 virtual void InvalidateRow(size_t row) OVERRIDE;
43 virtual void UpdateBoundsAndRedrawPopupInternal() OVERRIDE; 50 virtual void UpdateBoundsAndRedrawPopupInternal() OVERRIDE;
44 51
45 // Draw the given autofill entry in |entry_rect|. 52 // Draw the given autofill entry in |entry_rect|.
46 void DrawAutofillEntry(gfx::Canvas* canvas, 53 void DrawAutofillEntry(gfx::Canvas* canvas,
47 int index, 54 int index,
48 const gfx::Rect& entry_rect); 55 const gfx::Rect& entry_rect);
49 56
50 AutofillExternalDelegateViews* external_delegate_; // Weak reference. 57 AutofillExternalDelegateViews* external_delegate_; // Weak reference.
51 content::WebContents* web_contents_; // Weak reference. 58 content::WebContents* web_contents_; // Weak reference.
52 59
53 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); 60 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews);
54 }; 61 };
55 62
56 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ 63 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/autofill_popup_view_views.cc » ('j') | ui/views/widget/widget_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698