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

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

Issue 12091086: [Autofill] Add UMA timing metrics for requestAutocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase harder Created 7 years, 10 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 | Annotate | Revision Log
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_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/autofill/autofill_manager_delegate.h" 9 #include "chrome/browser/autofill/autofill_manager_delegate.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
11 #include "content/public/browser/web_contents_observer.h" 11 #include "content/public/browser/web_contents_observer.h"
12 #include "content/public/browser/web_contents_user_data.h" 12 #include "content/public/browser/web_contents_user_data.h"
13 13
14 namespace autofill {
15 class AutofillDialogControllerImpl;
16 }
17
18 namespace content { 14 namespace content {
19 struct FrameNavigateParams; 15 struct FrameNavigateParams;
20 struct LoadCommittedDetails; 16 struct LoadCommittedDetails;
21 class WebContents; 17 class WebContents;
22 } 18 }
23 19
20 namespace autofill {
21
22 class AutofillDialogControllerImpl;
23
24 // Chrome implementation of AutofillManagerDelegate. 24 // Chrome implementation of AutofillManagerDelegate.
25 class TabAutofillManagerDelegate 25 class TabAutofillManagerDelegate
26 : public autofill::AutofillManagerDelegate, 26 : public AutofillManagerDelegate,
27 public content::WebContentsUserData<TabAutofillManagerDelegate>, 27 public content::WebContentsUserData<TabAutofillManagerDelegate>,
28 public content::WebContentsObserver { 28 public content::WebContentsObserver {
29 public: 29 public:
30 virtual ~TabAutofillManagerDelegate() {} 30 virtual ~TabAutofillManagerDelegate() {}
31 31
32 // AutofillManagerDelegate implementation.
32 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 33 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
33 virtual content::BrowserContext* GetOriginalBrowserContext() const OVERRIDE; 34 virtual content::BrowserContext* GetOriginalBrowserContext() const OVERRIDE;
34 virtual Profile* GetOriginalProfile() const OVERRIDE; 35 virtual Profile* GetOriginalProfile() const OVERRIDE;
35 virtual InfoBarService* GetInfoBarService() OVERRIDE; 36 virtual InfoBarService* GetInfoBarService() OVERRIDE;
36 virtual PrefServiceBase* GetPrefs() OVERRIDE; 37 virtual PrefServiceBase* GetPrefs() OVERRIDE;
37 virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE; 38 virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE;
38 virtual bool IsSavingPasswordsEnabled() const OVERRIDE; 39 virtual bool IsSavingPasswordsEnabled() const OVERRIDE;
39 virtual void ShowAutofillSettings() OVERRIDE; 40 virtual void ShowAutofillSettings() OVERRIDE;
40 virtual void ShowPasswordGenerationBubble( 41 virtual void ShowPasswordGenerationBubble(
41 const gfx::Rect& bounds, 42 const gfx::Rect& bounds,
42 const content::PasswordForm& form, 43 const content::PasswordForm& form,
43 autofill::PasswordGenerator* generator) OVERRIDE; 44 PasswordGenerator* generator) OVERRIDE;
44 virtual void ShowAutocheckoutBubble( 45 virtual void ShowAutocheckoutBubble(
45 const gfx::RectF& bounds, 46 const gfx::RectF& bounds,
46 const gfx::NativeView& native_view, 47 const gfx::NativeView& native_view,
47 const base::Closure& callback) OVERRIDE; 48 const base::Closure& callback) OVERRIDE;
48 virtual void ShowRequestAutocompleteDialog( 49 virtual void ShowRequestAutocompleteDialog(
49 const FormData& form, 50 const FormData& form,
50 const GURL& source_url, 51 const GURL& source_url,
51 const content::SSLStatus& ssl_status, 52 const content::SSLStatus& ssl_status,
53 const AutofillMetrics& metric_logger,
54 DialogType dialog_type,
52 const base::Callback<void(const FormStructure*)>& callback) OVERRIDE; 55 const base::Callback<void(const FormStructure*)>& callback) OVERRIDE;
53 virtual void RequestAutocompleteDialogClosed() OVERRIDE; 56 virtual void RequestAutocompleteDialogClosed() OVERRIDE;
54 virtual void UpdateProgressBar(double value) OVERRIDE; 57 virtual void UpdateProgressBar(double value) OVERRIDE;
55 58
56 // content::WebContentsObserver implementation. 59 // content::WebContentsObserver implementation.
57 virtual void DidNavigateMainFrame( 60 virtual void DidNavigateMainFrame(
58 const content::LoadCommittedDetails& details, 61 const content::LoadCommittedDetails& details,
59 const content::FrameNavigateParams& params) OVERRIDE; 62 const content::FrameNavigateParams& params) OVERRIDE;
60 63
61 private: 64 private:
62 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); 65 explicit TabAutofillManagerDelegate(content::WebContents* web_contents);
63 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; 66 friend class content::WebContentsUserData<TabAutofillManagerDelegate>;
64 67
65 // Hides the associated request autocomplete dialog (if it exists). 68 // Hides the associated request autocomplete dialog (if it exists).
66 void HideRequestAutocompleteDialog(); 69 void HideRequestAutocompleteDialog();
67 70
68 content::WebContents* const web_contents_; 71 content::WebContents* const web_contents_;
69 autofill::AutofillDialogControllerImpl* autofill_dialog_controller_; // weak. 72 AutofillDialogControllerImpl* autofill_dialog_controller_; // weak.
70 73
71 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); 74 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate);
72 }; 75 };
73 76
77 } // namespace autofill
78
74 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 79 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_view.h ('k') | chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698