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

Unified Diff: chrome/browser/instant/instant_client.cc

Issue 11833043: Instant Extended: Fallback to local preview if the remote instant page is not ready on user input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: Addressing sreeram's comments. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_client.h ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_client.cc
diff --git a/chrome/browser/instant/instant_client.cc b/chrome/browser/instant/instant_client.cc
index c77f7cdd6e25e9355519227e42ce255a1e999d63..ab5d339e323f144101d0852bae88a1eca868c7c9 100644
--- a/chrome/browser/instant/instant_client.cc
+++ b/chrome/browser/instant/instant_client.cc
@@ -47,6 +47,16 @@ void InstantClient::SetMarginSize(const int start, const int end) {
Send(new ChromeViewMsg_SearchBoxMarginChange(routing_id(), start, end));
}
+void InstantClient::InitializeFonts() {
+ const gfx::Font& omnibox_font =
+ ui::ResourceBundle::GetSharedInstance().GetFont(
+ ui::ResourceBundle::MediumFont);
+ string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName());
+ size_t omnibox_font_size = omnibox_font.GetFontSize();
+ Send(new ChromeViewMsg_SearchBoxFontInformation(
+ routing_id(), omnibox_font_name, omnibox_font_size));
+}
+
void InstantClient::DetermineIfPageSupportsInstant() {
Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id()));
}
@@ -83,6 +93,11 @@ void InstantClient::KeyCaptureChanged(bool is_key_capture_enabled) {
is_key_capture_enabled));
}
+void InstantClient::RenderViewCreated(
+ content::RenderViewHost* render_view_host) {
+ delegate_->RenderViewCreated();
+}
+
void InstantClient::DidFinishLoad(
int64 /* frame_id */,
const GURL& /* validated_url */,
@@ -134,17 +149,6 @@ void InstantClient::SetSuggestions(
}
void InstantClient::InstantSupportDetermined(int page_id, bool result) {
- if (result) {
- // Inform the renderer process of the Omnibox's font information.
- const gfx::Font& omnibox_font =
- ui::ResourceBundle::GetSharedInstance().GetFont(
- ui::ResourceBundle::MediumFont);
- string16 omnibox_font_name = UTF8ToUTF16(omnibox_font.GetFontName());
- size_t omnibox_font_size = omnibox_font.GetFontSize();
-
- Send(new ChromeViewMsg_SearchBoxFontInformation(
- routing_id(), omnibox_font_name, omnibox_font_size));
- }
if (web_contents()->IsActiveEntry(page_id))
delegate_->InstantSupportDetermined(result);
}
« no previous file with comments | « chrome/browser/instant/instant_client.h ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698