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

Side by Side Diff: chrome/browser/instant/instant_loader.h

Issue 10905301: Switch CoreTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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_INSTANT_INSTANT_LOADER_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "chrome/browser/instant/instant_commit_type.h" 15 #include "chrome/browser/instant/instant_commit_type.h"
16 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
18 18
19 struct InstantAutocompleteResult; 19 struct InstantAutocompleteResult;
20 class InstantLoaderDelegate; 20 class InstantLoaderDelegate;
21 class TabContents; 21 class TabContents;
22 22
23 namespace content { 23 namespace content {
24 class NotificationDetails; 24 class NotificationDetails;
25 class NotificationSource; 25 class NotificationSource;
26 class WebContents;
26 } 27 }
27 28
28 namespace gfx { 29 namespace gfx {
29 class Rect; 30 class Rect;
30 } 31 }
31 32
32 namespace history { 33 namespace history {
33 class HistoryAddPageArgs; 34 class HistoryAddPageArgs;
34 } 35 }
35 36
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // content::NotificationObserver: 103 // content::NotificationObserver:
103 virtual void Observe(int type, 104 virtual void Observe(int type,
104 const content::NotificationSource& source, 105 const content::NotificationSource& source,
105 const content::NotificationDetails& details) OVERRIDE; 106 const content::NotificationDetails& details) OVERRIDE;
106 107
107 private: 108 private:
108 class WebContentsDelegateImpl; 109 class WebContentsDelegateImpl;
109 110
110 void SetupPreviewContents(); 111 void SetupPreviewContents();
111 void CleanupPreviewContents(); 112 void CleanupPreviewContents();
112 void ReplacePreviewContents(TabContents* old_tc, TabContents* new_tc); 113 void ReplacePreviewContents(content::WebContents* old_contents,
114 content::WebContents* new_contents);
113 115
114 InstantLoaderDelegate* const loader_delegate_; 116 InstantLoaderDelegate* const loader_delegate_;
115 117
116 // See comments on the getter above. 118 // See comments on the getter above.
117 scoped_ptr<TabContents> preview_contents_; 119 scoped_ptr<TabContents> preview_contents_;
118 120
119 // Delegate of the preview WebContents. Used to detect when the user does some 121 // Delegate of the preview WebContents. Used to detect when the user does some
120 // gesture on the WebContents and the preview needs to be activated. 122 // gesture on the WebContents and the preview needs to be activated.
121 scoped_ptr<WebContentsDelegateImpl> preview_delegate_; 123 scoped_ptr<WebContentsDelegateImpl> preview_delegate_;
122 124
123 // See comments on the getter above. 125 // See comments on the getter above.
124 bool supports_instant_; 126 bool supports_instant_;
125 127
126 // See comments on the getter above. 128 // See comments on the getter above.
127 const std::string instant_url_; 129 const std::string instant_url_;
128 130
129 // Used to get notifications about renderers coming and going. 131 // Used to get notifications about renderers coming and going.
130 content::NotificationRegistrar registrar_; 132 content::NotificationRegistrar registrar_;
131 133
132 // See comments on the getter above. 134 // See comments on the getter above.
133 scoped_refptr<history::HistoryAddPageArgs> last_navigation_; 135 scoped_refptr<history::HistoryAddPageArgs> last_navigation_;
134 136
135 DISALLOW_COPY_AND_ASSIGN(InstantLoader); 137 DISALLOW_COPY_AND_ASSIGN(InstantLoader);
136 }; 138 };
137 139
138 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 140 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_loader.cc » ('j') | chrome/browser/prerender/prerender_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698