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

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

Issue 5720002: Merge 68816 - Fixes bug where we would show an instant preview when we though... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Releases the preview TabContents passing ownership to the caller. This is 61 // Releases the preview TabContents passing ownership to the caller. This is
62 // intended to be called when the preview TabContents is committed. This does 62 // intended to be called when the preview TabContents is committed. This does
63 // not notify the delegate. 63 // not notify the delegate.
64 TabContentsWrapper* ReleasePreviewContents(InstantCommitType type); 64 TabContentsWrapper* ReleasePreviewContents(InstantCommitType type);
65 65
66 // Calls through to method of same name on delegate. 66 // Calls through to method of same name on delegate.
67 bool ShouldCommitInstantOnMouseUp(); 67 bool ShouldCommitInstantOnMouseUp();
68 void CommitInstantLoader(); 68 void CommitInstantLoader();
69 69
70 // Resets the template_url_id_ to zero and shows this loader. This is only
71 // intended to be invoked from InstantLoaderDoesntSupportInstant.
72 void ClearTemplateURLID();
73
74 virtual void Observe(NotificationType type, 70 virtual void Observe(NotificationType type,
75 const NotificationSource& source, 71 const NotificationSource& source,
76 const NotificationDetails& details); 72 const NotificationDetails& details);
77 73
78 // The preview TabContents; may be null. 74 // The preview TabContents; may be null.
79 TabContentsWrapper* preview_contents() const { 75 TabContentsWrapper* preview_contents() const {
80 return preview_contents_.get(); 76 return preview_contents_.get();
81 } 77 }
82 78
83 // Returns true if the preview TabContents is ready to be shown. 79 // Returns true if the preview TabContents is ready to be shown.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Invoked from the timer to update the bounds of the omnibox. 130 // Invoked from the timer to update the bounds of the omnibox.
135 void ProcessBoundsChange(); 131 void ProcessBoundsChange();
136 132
137 // Creates and sets the preview TabContentsWrapper. 133 // Creates and sets the preview TabContentsWrapper.
138 void CreatePreviewContents(TabContentsWrapper* tab_contents); 134 void CreatePreviewContents(TabContentsWrapper* tab_contents);
139 135
140 InstantLoaderDelegate* delegate_; 136 InstantLoaderDelegate* delegate_;
141 137
142 // If we're showing instant results this is the ID of the TemplateURL driving 138 // If we're showing instant results this is the ID of the TemplateURL driving
143 // the results. A value of 0 means there is no TemplateURL. 139 // the results. A value of 0 means there is no TemplateURL.
144 TemplateURLID template_url_id_; 140 const TemplateURLID template_url_id_;
145 141
146 // The url we're displaying. 142 // The url we're displaying.
147 GURL url_; 143 GURL url_;
148 144
149 // The URL first used to load instant results.
150 GURL initial_instant_url_;
151
152 // Delegate of the preview TabContents. Used to detect when the user does some 145 // Delegate of the preview TabContents. Used to detect when the user does some
153 // gesture on the TabContents and the preview needs to be activated. 146 // gesture on the TabContents and the preview needs to be activated.
154 scoped_ptr<TabContentsDelegateImpl> preview_tab_contents_delegate_; 147 scoped_ptr<TabContentsDelegateImpl> preview_tab_contents_delegate_;
155 148
156 // The preview TabContents; may be null. 149 // The preview TabContents; may be null.
157 scoped_ptr<TabContentsWrapper> preview_contents_; 150 scoped_ptr<TabContentsWrapper> preview_contents_;
158 151
159 // Is the preview_contents ready to be shown? 152 // Is the preview_contents ready to be shown?
160 bool ready_; 153 bool ready_;
161 154
(...skipping 23 matching lines...) Expand all
185 // Used to get notifications about renderers coming and going. 178 // Used to get notifications about renderers coming and going.
186 NotificationRegistrar registrar_; 179 NotificationRegistrar registrar_;
187 180
188 // Last value of verbatim passed to |Update|. 181 // Last value of verbatim passed to |Update|.
189 bool verbatim_; 182 bool verbatim_;
190 183
191 DISALLOW_COPY_AND_ASSIGN(InstantLoader); 184 DISALLOW_COPY_AND_ASSIGN(InstantLoader);
192 }; 185 };
193 186
194 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 187 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698