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

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: include nit Created 7 years, 10 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 9725d5e7648afeffbb90f68c9f51a95387b681d7..03b2247c6a663c85389ebfdacee2563a425c03ad 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -898,10 +898,12 @@ void InstantController::InstantPageRenderViewCreated(
omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE);
overlay_->SetMarginSize(start_margin_, end_margin_);
overlay_->InitializeFonts();
+ overlay_->GrantAccessFromOrigin(GURL(overlay_->instant_url()));
} else if (IsContentsFrom(ntp(), contents)) {
ntp_->SetDisplayInstantResults(instant_enabled_);
ntp_->SetMarginSize(start_margin_, end_margin_);
ntp_->InitializeFonts();
+ ntp_->GrantAccessFromOrigin(GURL(ntp_->instant_url()));
} else {
NOTREACHED();
}
@@ -1232,6 +1234,7 @@ void InstantController::ResetInstantTab() {
instant_tab_->SetDisplayInstantResults(instant_enabled_);
instant_tab_->SetMarginSize(start_margin_, end_margin_);
instant_tab_->InitializeFonts();
+ instant_tab_->GrantAccessFromOrigin(active_tab->GetURL());
StartListeningToMostVisitedChanges();
instant_tab_->KeyCaptureChanged(
omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE);

Powered by Google App Engine
This is Rietveld 408576698