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

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

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another rebase Created 7 years, 9 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
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 14b4d1650ed7f52dbe9f72973fb4088b436a8eac..00c52c10988508f96d5c4318e865e3dd5802e3d9 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -902,10 +902,12 @@ void InstantController::InstantPageRenderViewCreated(
omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE);
overlay_->SetOmniboxBounds(omnibox_bounds_);
overlay_->InitializeFonts();
+ overlay_->GrantChromeSearchAccessFromOrigin(GURL(overlay_->instant_url()));
} else if (IsContentsFrom(ntp(), contents)) {
ntp_->SetDisplayInstantResults(instant_enabled_);
ntp_->SetOmniboxBounds(omnibox_bounds_);
ntp_->InitializeFonts();
+ ntp_->GrantChromeSearchAccessFromOrigin(GURL(ntp_->instant_url()));
} else {
NOTREACHED();
}
@@ -1244,6 +1246,7 @@ void InstantController::ResetInstantTab() {
instant_tab_->SetDisplayInstantResults(instant_enabled_);
instant_tab_->SetOmniboxBounds(omnibox_bounds_);
instant_tab_->InitializeFonts();
+ instant_tab_->GrantChromeSearchAccessFromOrigin(active_tab->GetURL());
StartListeningToMostVisitedChanges();
instant_tab_->KeyCaptureChanged(
omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE);
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_extended_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698