Index: chrome/browser/instant/instant_overlay.h |
diff --git a/chrome/browser/instant/instant_loader.h b/chrome/browser/instant/instant_overlay.h |
similarity index 84% |
rename from chrome/browser/instant/instant_loader.h |
rename to chrome/browser/instant/instant_overlay.h |
index 185d2ff53e9317c3b7838c66ac3adf826f2e5c61..305280f6f8200533e9a2e462ee1b03174373248d 100644 |
--- a/chrome/browser/instant/instant_loader.h |
+++ b/chrome/browser/instant/instant_overlay.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
-#define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
+#ifndef CHROME_BROWSER_INSTANT_INSTANT_OVERLAY_H_ |
+#define CHROME_BROWSER_INSTANT_INSTANT_OVERLAY_H_ |
#include <string> |
#include <vector> |
@@ -19,6 +19,7 @@ |
struct InstantAutocompleteResult; |
class InstantController; |
+class Profile; |
struct ThemeBackgroundInfo; |
namespace chrome { |
@@ -35,27 +36,28 @@ namespace gfx { |
class Rect; |
} |
-// InstantLoader is used to communicate with a preview WebContents that it owns |
+// InstantOverlay is used to communicate with a preview WebContents that it owns |
// and loads the "Instant URL" into. This preview can appear and disappear at |
// will as the user types in the omnibox (compare: InstantTab, which talks to a |
// committed tab on the tab strip). |
-class InstantLoader : public InstantClient::Delegate, |
- public content::NotificationObserver { |
+class InstantOverlay : public InstantClient::Delegate, |
+ public content::NotificationObserver { |
public: |
- // Returns the Instant loader for |contents| if it's used for Instant. |
- static InstantLoader* FromWebContents(const content::WebContents* contents); |
+ // Returns the Instant overlay for |contents| if it's used for Instant. |
+ static InstantOverlay* FromWebContents(const content::WebContents* contents); |
// Doesn't take ownership of |controller|. |
- InstantLoader(InstantController* controller, const std::string& instant_url); |
- virtual ~InstantLoader(); |
+ InstantOverlay(InstantController* controller, const std::string& instant_url); |
+ virtual ~InstantOverlay(); |
- // The preview WebContents. InstantLoader retains ownership. This will be |
+ // The preview WebContents. InstantOverlay retains ownership. This will be |
// non-NULL after InitFromContents(), and until ReleaseContents() is called. |
content::WebContents* contents() const { return contents_.get(); } |
- // Creates a new WebContents and loads |instant_url_| into it. |active_tab| is |
- // the page the preview will be shown on top of and potentially replace. |
- void InitContents(const content::WebContents* active_tab); |
+ // Creates a new WebContents and loads |instant_url_| into it. Uses |
+ // |active_tab|, if non-NULL, to initialize the size of the WebContents. |
+ void InitContents(Profile* profile, |
+ const content::WebContents* active_tab); |
// Releases the preview WebContents passing ownership to the caller. This |
// should be called when the preview is committed. |
@@ -86,7 +88,7 @@ class InstantLoader : public InstantClient::Delegate, |
// to the history service had this WebContents not been used for Instant. |
void DidNavigate(const history::HistoryAddPageArgs& add_page_args); |
- // Returns true if the loader is using |
+ // Returns true if the overlay is using |
// InstantController::kLocalOmniboxPopupURL as the |instant_url_|. |
bool IsUsingLocalPreview() const; |
@@ -151,7 +153,7 @@ class InstantLoader : public InstantClient::Delegate, |
// Used to get notifications about renderers coming and going. |
content::NotificationRegistrar registrar_; |
- DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
+ DISALLOW_COPY_AND_ASSIGN(InstantOverlay); |
}; |
-#endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
+#endif // CHROME_BROWSER_INSTANT_INSTANT_OVERLAY_H_ |