| Index: chrome/browser/instant/instant_loader.cc
|
| diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
|
| index 509bfe1e519420598094f56f21108422bf6457dd..6b0c84e58e2dabba0185a75d4a1183185ef94625 100644
|
| --- a/chrome/browser/instant/instant_loader.cc
|
| +++ b/chrome/browser/instant/instant_loader.cc
|
| @@ -90,6 +90,10 @@ class InstantLoader::WebContentsDelegateImpl
|
| void OnSetSuggestions(int page_id,
|
| const std::vector<InstantSuggestion>& suggestions);
|
|
|
| + // Message from renderer indicating whether the page has a custom logo to
|
| + // display on the NTP.
|
| + void OnSetHasCustomLogo(int page_id, bool has_logo);
|
| +
|
| // Message from the renderer determining whether it supports the Instant API.
|
| void OnInstantSupportDetermined(int page_id, bool result);
|
|
|
| @@ -200,6 +204,8 @@ bool InstantLoader::WebContentsDelegateImpl::OnMessageReceived(
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(WebContentsDelegateImpl, message)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetSuggestions, OnSetSuggestions)
|
| + IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetHasCustomLogo,
|
| + OnSetHasCustomLogo);
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_InstantSupportDetermined,
|
| OnInstantSupportDetermined)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SetInstantPreviewHeight,
|
| @@ -222,6 +228,21 @@ void InstantLoader::WebContentsDelegateImpl::OnSetSuggestions(
|
| }
|
| }
|
|
|
| +// Message from renderer indicating whether the page has a custom logo to
|
| +// display on the NTP.
|
| +void InstantLoader::WebContentsDelegateImpl::OnSetHasCustomLogo(
|
| + int page_id,
|
| + bool has_logo) {
|
| + DCHECK(loader_->preview_contents());
|
| + DCHECK(loader_->preview_contents_->web_contents());
|
| + content::NavigationEntry* entry = loader_->preview_contents_->web_contents()->
|
| + GetController().GetActiveEntry();
|
| + if (entry && page_id == entry->GetPageID()) {
|
| + MaybeSetAndNotifyInstantSupportDetermined(true);
|
| + loader_->loader_delegate_->SetHasCustomLogo(loader_, has_logo);
|
| + }
|
| +}
|
| +
|
| void InstantLoader::WebContentsDelegateImpl::OnInstantSupportDetermined(
|
| int page_id,
|
| bool result) {
|
|
|