| 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 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // SearchIPCRouter is responsible for receiving and sending IPC messages between | 31 // SearchIPCRouter is responsible for receiving and sending IPC messages between |
| 32 // the browser and the Instant page. | 32 // the browser and the Instant page. |
| 33 class SearchIPCRouter : public content::WebContentsObserver, | 33 class SearchIPCRouter : public content::WebContentsObserver, |
| 34 public chrome::mojom::Instant { | 34 public chrome::mojom::Instant { |
| 35 public: | 35 public: |
| 36 // SearchIPCRouter calls its delegate in response to messages received from | 36 // SearchIPCRouter calls its delegate in response to messages received from |
| 37 // the page. | 37 // the page. |
| 38 class Delegate { | 38 class Delegate { |
| 39 public: | 39 public: |
| 40 // Called upon determination of Instant API support in response to the page | |
| 41 // load event. | |
| 42 // TODO(treib): Remove this. crbug.com/627747 | |
| 43 virtual void OnInstantSupportDetermined(bool supports_instant) = 0; | |
| 44 | |
| 45 // Called when the page wants the omnibox to be focused. |state| specifies | 40 // Called when the page wants the omnibox to be focused. |state| specifies |
| 46 // the omnibox focus state. | 41 // the omnibox focus state. |
| 47 virtual void FocusOmnibox(OmniboxFocusState state) = 0; | 42 virtual void FocusOmnibox(OmniboxFocusState state) = 0; |
| 48 | 43 |
| 49 // Called when the SearchBox wants to delete a Most Visited item. | 44 // Called when the SearchBox wants to delete a Most Visited item. |
| 50 virtual void OnDeleteMostVisitedItem(const GURL& url) = 0; | 45 virtual void OnDeleteMostVisitedItem(const GURL& url) = 0; |
| 51 | 46 |
| 52 // Called when the SearchBox wants to undo a Most Visited deletion. | 47 // Called when the SearchBox wants to undo a Most Visited deletion. |
| 53 virtual void OnUndoMostVisitedDeletion(const GURL& url) = 0; | 48 virtual void OnUndoMostVisitedDeletion(const GURL& url) = 0; |
| 54 | 49 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // the moment, but this could be extended to a map of connected frames, if | 230 // the moment, but this could be extended to a map of connected frames, if |
| 236 // desired. | 231 // desired. |
| 237 mojo::AssociatedBinding<chrome::mojom::Instant> binding_; | 232 mojo::AssociatedBinding<chrome::mojom::Instant> binding_; |
| 238 | 233 |
| 239 std::unique_ptr<SearchBoxClientFactory> search_box_client_factory_; | 234 std::unique_ptr<SearchBoxClientFactory> search_box_client_factory_; |
| 240 | 235 |
| 241 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); | 236 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); |
| 242 }; | 237 }; |
| 243 | 238 |
| 244 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 239 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| OLD | NEW |