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

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: Fix the test. 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 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 32 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
Evan Stade 2013/02/05 20:06:41 // Foo implementation.
Ilya Sherman 2013/02/06 00:02:25 Done.
33 virtual content::BrowserContext* GetOriginalBrowserContext() const OVERRIDE; 33 virtual content::BrowserContext* GetOriginalBrowserContext() const OVERRIDE;
34 virtual Profile* GetOriginalProfile() const OVERRIDE; 34 virtual Profile* GetOriginalProfile() const OVERRIDE;
35 virtual InfoBarService* GetInfoBarService() OVERRIDE; 35 virtual InfoBarService* GetInfoBarService() OVERRIDE;
36 virtual PrefServiceBase* GetPrefs() OVERRIDE; 36 virtual PrefServiceBase* GetPrefs() OVERRIDE;
37 virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE; 37 virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE;
38 virtual bool IsSavingPasswordsEnabled() const OVERRIDE; 38 virtual bool IsSavingPasswordsEnabled() const OVERRIDE;
39 virtual void ShowAutofillSettings() OVERRIDE; 39 virtual void ShowAutofillSettings() OVERRIDE;
40 virtual void ShowPasswordGenerationBubble( 40 virtual void ShowPasswordGenerationBubble(
41 const gfx::Rect& bounds, 41 const gfx::Rect& bounds,
42 const content::PasswordForm& form, 42 const content::PasswordForm& form,
43 autofill::PasswordGenerator* generator) OVERRIDE; 43 PasswordGenerator* generator) OVERRIDE;
44 virtual void ShowRequestAutocompleteDialog( 44 virtual void ShowRequestAutocompleteDialog(
45 const FormData& form, 45 const FormData& form,
46 const GURL& source_url, 46 const GURL& source_url,
47 const content::SSLStatus& ssl_status, 47 const content::SSLStatus& ssl_status,
48 const AutofillMetrics& metric_logger,
49 DialogRequester requester,
48 const base::Callback<void(const FormStructure*)>& callback) OVERRIDE; 50 const base::Callback<void(const FormStructure*)>& callback) OVERRIDE;
49 virtual void RequestAutocompleteDialogClosed() OVERRIDE; 51 virtual void RequestAutocompleteDialogClosed() OVERRIDE;
50 52
51 // content::WebContentsObserver implementation. 53 // content::WebContentsObserver implementation.
52 virtual void DidNavigateMainFrame( 54 virtual void DidNavigateMainFrame(
53 const content::LoadCommittedDetails& details, 55 const content::LoadCommittedDetails& details,
54 const content::FrameNavigateParams& params) OVERRIDE; 56 const content::FrameNavigateParams& params) OVERRIDE;
55 57
56 private: 58 private:
57 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); 59 explicit TabAutofillManagerDelegate(content::WebContents* web_contents);
58 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; 60 friend class content::WebContentsUserData<TabAutofillManagerDelegate>;
59 61
60 // Hides the associated request autocomplete dialog (if it exists). 62 // Hides the associated request autocomplete dialog (if it exists).
61 void HideRequestAutocompleteDialog(); 63 void HideRequestAutocompleteDialog();
62 64
63 content::WebContents* const web_contents_; 65 content::WebContents* const web_contents_;
64 autofill::AutofillDialogControllerImpl* autofill_dialog_controller_; // weak. 66 AutofillDialogControllerImpl* autofill_dialog_controller_; // weak.
65 67
66 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); 68 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate);
67 }; 69 };
68 70
71 } // namespace autofill
72
69 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 73 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698