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

Side by Side Diff: chrome/browser/prerender/prerender_tab_helper.h

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mem leak Created 6 years 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_PRERENDER_PRERENDER_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 26 matching lines...) Expand all
37 EVENT_LOGGED_IN_TABLE_PRESENT = 1, 37 EVENT_LOGGED_IN_TABLE_PRESENT = 1,
38 EVENT_MAINFRAME_CHANGE = 2, 38 EVENT_MAINFRAME_CHANGE = 2,
39 EVENT_MAINFRAME_CHANGE_DOMAIN_LOGGED_IN = 3, 39 EVENT_MAINFRAME_CHANGE_DOMAIN_LOGGED_IN = 3,
40 EVENT_MAINFRAME_COMMIT = 4, 40 EVENT_MAINFRAME_COMMIT = 4,
41 EVENT_MAINFRAME_COMMIT_DOMAIN_LOGGED_IN = 5, 41 EVENT_MAINFRAME_COMMIT_DOMAIN_LOGGED_IN = 5,
42 EVENT_LOGIN_ACTION_ADDED = 6, 42 EVENT_LOGIN_ACTION_ADDED = 6,
43 EVENT_LOGIN_ACTION_ADDED_PW_EMPTY = 7, 43 EVENT_LOGIN_ACTION_ADDED_PW_EMPTY = 7,
44 EVENT_MAX_VALUE 44 EVENT_MAX_VALUE
45 }; 45 };
46 46
47 static void CreateForWebContentsWithPasswordManager(
48 content::WebContents* web_contents,
49 password_manager::PasswordManager* password_manager);
50
51 ~PrerenderTabHelper() override; 47 ~PrerenderTabHelper() override;
52 48
53 // content::WebContentsObserver implementation. 49 // content::WebContentsObserver implementation.
54 void DidGetRedirectForResourceRequest( 50 void DidGetRedirectForResourceRequest(
55 content::RenderFrameHost* render_frame_host, 51 content::RenderFrameHost* render_frame_host,
56 const content::ResourceRedirectDetails& details) override; 52 const content::ResourceRedirectDetails& details) override;
57 void DidStopLoading(content::RenderViewHost* render_view_host) override; 53 void DidStopLoading(content::RenderViewHost* render_view_host) override;
58 void DidStartProvisionalLoadForFrame( 54 void DidStartProvisionalLoadForFrame(
59 content::RenderFrameHost* render_frame_host, 55 content::RenderFrameHost* render_frame_host,
60 const GURL& validated_url, 56 const GURL& validated_url,
(...skipping 11 matching lines...) Expand all
72 // Called when a password form has been submitted. 68 // Called when a password form has been submitted.
73 void PasswordSubmitted(const autofill::PasswordForm& form); 69 void PasswordSubmitted(const autofill::PasswordForm& form);
74 70
75 // Called when this prerendered WebContents has just been swapped in. 71 // Called when this prerendered WebContents has just been swapped in.
76 void PrerenderSwappedIn(); 72 void PrerenderSwappedIn();
77 73
78 // Called when a control prerender is resolved. Applies to the next load. 74 // Called when a control prerender is resolved. Applies to the next load.
79 void WouldHavePrerenderedNextLoad(Origin origin); 75 void WouldHavePrerenderedNextLoad(Origin origin);
80 76
81 private: 77 private:
82 PrerenderTabHelper(content::WebContents* web_contents, 78 explicit PrerenderTabHelper(content::WebContents* web_contents);
83 password_manager::PasswordManager* password_manager);
84 friend class content::WebContentsUserData<PrerenderTabHelper>; 79 friend class content::WebContentsUserData<PrerenderTabHelper>;
85 80
86 void RecordEvent(Event event) const; 81 void RecordEvent(Event event) const;
87 void RecordEventIfLoggedInURL(Event event, const GURL& url); 82 void RecordEventIfLoggedInURL(Event event, const GURL& url);
88 void RecordEventIfLoggedInURLResult(Event event, scoped_ptr<bool> is_present, 83 void RecordEventIfLoggedInURLResult(Event event, scoped_ptr<bool> is_present,
89 scoped_ptr<bool> lookup_succeeded); 84 scoped_ptr<bool> lookup_succeeded);
90 85
91 void RecordPerceivedPageLoadTime( 86 void RecordPerceivedPageLoadTime(
92 base::TimeDelta perceived_page_load_time, 87 base::TimeDelta perceived_page_load_time,
93 double fraction_plt_elapsed_at_swap_in); 88 double fraction_plt_elapsed_at_swap_in);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 GURL url_; 123 GURL url_;
129 124
130 base::WeakPtrFactory<PrerenderTabHelper> weak_factory_; 125 base::WeakPtrFactory<PrerenderTabHelper> weak_factory_;
131 126
132 DISALLOW_COPY_AND_ASSIGN(PrerenderTabHelper); 127 DISALLOW_COPY_AND_ASSIGN(PrerenderTabHelper);
133 }; 128 };
134 129
135 } // namespace prerender 130 } // namespace prerender
136 131
137 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_ 132 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698