| Index: chrome/renderer/searchbox/searchbox.cc
|
| diff --git a/chrome/renderer/searchbox/searchbox.cc b/chrome/renderer/searchbox/searchbox.cc
|
| index 41a44b62773bc1e543dce3ed587373d20e5c9355..42635315bcd9aa4f98130c6d016a721fd77eb89f 100644
|
| --- a/chrome/renderer/searchbox/searchbox.cc
|
| +++ b/chrome/renderer/searchbox/searchbox.cc
|
| @@ -244,10 +244,14 @@ SearchBox::SearchBox(content::RenderFrame* render_frame)
|
| most_visited_items_cache_(kMaxInstantMostVisitedItemCacheSize),
|
| query_(),
|
| binding_(this) {
|
| - render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
| - &instant_service_);
|
| - render_frame->GetAssociatedInterfaceRegistry()->AddInterface(
|
| - base::Bind(&SearchBox::Bind, base::Unretained(this)));
|
| + // Connect to the NTP interface in the browser.
|
| + chrome::mojom::NTPConnectorAssociatedPtr ntp_connector;
|
| + render_frame->GetRemoteAssociatedInterfaces()->GetInterface(&ntp_connector);
|
| + chrome::mojom::SearchBoxAssociatedPtrInfo search_box;
|
| + binding_.Bind(&search_box, ntp_connector.associated_group());
|
| + ntp_connector->Connect(
|
| + mojo::MakeRequest(&instant_service_, ntp_connector.associated_group()),
|
| + std::move(search_box));
|
| }
|
|
|
| SearchBox::~SearchBox() {
|
|
|