| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 5 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| 6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "chrome/common/instant.mojom.h" | 13 #include "chrome/common/instant.mojom.h" |
| 14 #include "chrome/common/search/instant_types.h" | 14 #include "chrome/common/search/instant_types.h" |
| 15 #include "chrome/common/search/ntp_logging_events.h" | 15 #include "chrome/common/search/ntp_logging_events.h" |
| 16 #include "chrome/renderer/instant_restricted_id_cache.h" | 16 #include "chrome/renderer/instant_restricted_id_cache.h" |
| 17 #include "components/ntp_tiles/ntp_tile_source.h" | 17 #include "components/ntp_tiles/tile_source.h" |
| 18 #include "components/omnibox/common/omnibox_focus_state.h" | 18 #include "components/omnibox/common/omnibox_focus_state.h" |
| 19 #include "content/public/renderer/render_frame_observer.h" | 19 #include "content/public/renderer/render_frame_observer.h" |
| 20 #include "content/public/renderer/render_frame_observer_tracker.h" | 20 #include "content/public/renderer/render_frame_observer_tracker.h" |
| 21 #include "mojo/public/cpp/bindings/associated_binding.h" | 21 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 22 #include "ui/base/window_open_disposition.h" | 22 #include "ui/base/window_open_disposition.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 class SearchBox : public content::RenderFrameObserver, | 25 class SearchBox : public content::RenderFrameObserver, |
| 26 public content::RenderFrameObserverTracker<SearchBox>, | 26 public content::RenderFrameObserverTracker<SearchBox>, |
| 27 public chrome::mojom::SearchBox { | 27 public chrome::mojom::SearchBox { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 explicit SearchBox(content::RenderFrame* render_frame); | 50 explicit SearchBox(content::RenderFrame* render_frame); |
| 51 ~SearchBox() override; | 51 ~SearchBox() override; |
| 52 | 52 |
| 53 // Sends LogEvent to the browser. | 53 // Sends LogEvent to the browser. |
| 54 void LogEvent(NTPLoggingEventType event); | 54 void LogEvent(NTPLoggingEventType event); |
| 55 | 55 |
| 56 // Sends LogMostVisitedImpression to the browser. | 56 // Sends LogMostVisitedImpression to the browser. |
| 57 void LogMostVisitedImpression(int position, | 57 void LogMostVisitedImpression(int position, |
| 58 ntp_tiles::NTPTileSource tile_source); | 58 ntp_tiles::TileSource tile_source); |
| 59 | 59 |
| 60 // Sends LogMostVisitedNavigation to the browser. | 60 // Sends LogMostVisitedNavigation to the browser. |
| 61 void LogMostVisitedNavigation(int position, | 61 void LogMostVisitedNavigation(int position, |
| 62 ntp_tiles::NTPTileSource tile_source); | 62 ntp_tiles::TileSource tile_source); |
| 63 | 63 |
| 64 // Sends ChromeIdentityCheck to the browser. | 64 // Sends ChromeIdentityCheck to the browser. |
| 65 void CheckIsUserSignedInToChromeAs(const base::string16& identity); | 65 void CheckIsUserSignedInToChromeAs(const base::string16& identity); |
| 66 | 66 |
| 67 // Sends HistorySyncCheck to the browser. | 67 // Sends HistorySyncCheck to the browser. |
| 68 void CheckIsUserSyncingHistory(); | 68 void CheckIsUserSyncingHistory(); |
| 69 | 69 |
| 70 // Sends DeleteMostVisitedItem to the browser. | 70 // Sends DeleteMostVisitedItem to the browser. |
| 71 void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); | 71 void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); |
| 72 | 72 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 base::string16 query_; | 173 base::string16 query_; |
| 174 EmbeddedSearchRequestParams embedded_search_request_params_; | 174 EmbeddedSearchRequestParams embedded_search_request_params_; |
| 175 InstantSuggestion suggestion_; | 175 InstantSuggestion suggestion_; |
| 176 chrome::mojom::InstantAssociatedPtr instant_service_; | 176 chrome::mojom::InstantAssociatedPtr instant_service_; |
| 177 mojo::AssociatedBinding<chrome::mojom::SearchBox> binding_; | 177 mojo::AssociatedBinding<chrome::mojom::SearchBox> binding_; |
| 178 | 178 |
| 179 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 179 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 182 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |