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

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

Issue 5697003: Fixes bug in instant where we wouldn't initially tell the page the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update test for new API 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Are we waiting for the preview page to finish loading? 120 // Are we waiting for the preview page to finish loading?
121 bool is_waiting_for_load() const { 121 bool is_waiting_for_load() const {
122 return frame_load_observer_.get() != NULL; 122 return frame_load_observer_.get() != NULL;
123 } 123 }
124 124
125 // Invoked if it the page doesn't really support instant when we thought it 125 // Invoked if it the page doesn't really support instant when we thought it
126 // did. If |needs_reload| is true, the text changed since the first load and 126 // did. If |needs_reload| is true, the text changed since the first load and
127 // the page needs to be reloaded. 127 // the page needs to be reloaded.
128 void PageDoesntSupportInstant(bool needs_reload); 128 void PageDoesntSupportInstant(bool needs_reload);
129 129
130 // Invoked from the timer to update the bounds of the omnibox. 130 // Invokes |SetBoundsToPage(false)|. This is called from the timer.
131 void ProcessBoundsChange(); 131 void ProcessBoundsChange();
132 132
133 // Notifes the page of the omnibox bounds. If |force_if_loading| is true the
134 // bounds are sent down even if we're waiting on the load, otherwise if we're
135 // waiting on the load and |force_if_loading| is false this does nothing.
136 void SendBoundsToPage(bool force_if_loading);
137
133 // Creates and sets the preview TabContentsWrapper. 138 // Creates and sets the preview TabContentsWrapper.
134 void CreatePreviewContents(TabContentsWrapper* tab_contents); 139 void CreatePreviewContents(TabContentsWrapper* tab_contents);
135 140
136 InstantLoaderDelegate* delegate_; 141 InstantLoaderDelegate* delegate_;
137 142
138 // If we're showing instant results this is the ID of the TemplateURL driving 143 // If we're showing instant results this is the ID of the TemplateURL driving
139 // the results. A value of 0 means there is no TemplateURL. 144 // the results. A value of 0 means there is no TemplateURL.
140 const TemplateURLID template_url_id_; 145 const TemplateURLID template_url_id_;
141 146
142 // The url we're displaying. 147 // The url we're displaying.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Used to get notifications about renderers coming and going. 183 // Used to get notifications about renderers coming and going.
179 NotificationRegistrar registrar_; 184 NotificationRegistrar registrar_;
180 185
181 // Last value of verbatim passed to |Update|. 186 // Last value of verbatim passed to |Update|.
182 bool verbatim_; 187 bool verbatim_;
183 188
184 DISALLOW_COPY_AND_ASSIGN(InstantLoader); 189 DISALLOW_COPY_AND_ASSIGN(InstantLoader);
185 }; 190 };
186 191
187 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 192 #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