OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/search/search_ipc_router.h" | 5 #include "chrome/browser/ui/search/search_ipc_router.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/search/instant_service.h" | 10 #include "chrome/browser/search/instant_service.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 public chrome::mojom::EmbeddedSearchConnector { | 36 public chrome::mojom::EmbeddedSearchConnector { |
37 public: | 37 public: |
38 // |web_contents| and |binding| must outlive this object. | 38 // |web_contents| and |binding| must outlive this object. |
39 SearchBoxClientFactoryImpl( | 39 SearchBoxClientFactoryImpl( |
40 content::WebContents* web_contents, | 40 content::WebContents* web_contents, |
41 mojo::AssociatedBinding<chrome::mojom::Instant>* binding) | 41 mojo::AssociatedBinding<chrome::mojom::Instant>* binding) |
42 : client_binding_(binding), factory_bindings_(web_contents, this) { | 42 : client_binding_(binding), factory_bindings_(web_contents, this) { |
43 DCHECK(web_contents); | 43 DCHECK(web_contents); |
44 DCHECK(binding); | 44 DCHECK(binding); |
45 // Before we are connected to a frame we throw away all messages. | 45 // Before we are connected to a frame we throw away all messages. |
46 mojo::GetIsolatedProxy(&search_box_); | 46 mojo::MakeIsolatedRequest(&search_box_); |
47 } | 47 } |
48 | 48 |
49 chrome::mojom::SearchBox* GetSearchBox() override { | 49 chrome::mojom::SearchBox* GetSearchBox() override { |
50 return search_box_.get(); | 50 return search_box_.get(); |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 void Connect(chrome::mojom::InstantAssociatedRequest request, | 54 void Connect(chrome::mojom::InstantAssociatedRequest request, |
55 chrome::mojom::SearchBoxAssociatedPtrInfo client) override; | 55 chrome::mojom::SearchBoxAssociatedPtrInfo client) override; |
56 | 56 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 315 |
316 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) { | 316 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) { |
317 DCHECK(delegate); | 317 DCHECK(delegate); |
318 delegate_ = delegate; | 318 delegate_ = delegate; |
319 } | 319 } |
320 | 320 |
321 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) { | 321 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) { |
322 DCHECK(policy); | 322 DCHECK(policy); |
323 policy_ = std::move(policy); | 323 policy_ = std::move(policy); |
324 } | 324 } |
OLD | NEW |