| 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/tile_source.h" | 17 #include "components/ntp_tiles/tile_source.h" |
| 18 #include "components/ntp_tiles/tile_visual_type.h" |
| 18 #include "components/omnibox/common/omnibox_focus_state.h" | 19 #include "components/omnibox/common/omnibox_focus_state.h" |
| 19 #include "content/public/renderer/render_frame_observer.h" | 20 #include "content/public/renderer/render_frame_observer.h" |
| 20 #include "content/public/renderer/render_frame_observer_tracker.h" | 21 #include "content/public/renderer/render_frame_observer_tracker.h" |
| 21 #include "mojo/public/cpp/bindings/associated_binding.h" | 22 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 22 #include "ui/base/window_open_disposition.h" | 23 #include "ui/base/window_open_disposition.h" |
| 23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 24 | 25 |
| 25 class SearchBox : public content::RenderFrameObserver, | 26 class SearchBox : public content::RenderFrameObserver, |
| 26 public content::RenderFrameObserverTracker<SearchBox>, | 27 public content::RenderFrameObserverTracker<SearchBox>, |
| 27 public chrome::mojom::SearchBox { | 28 public chrome::mojom::SearchBox { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 explicit SearchBox(content::RenderFrame* render_frame); | 51 explicit SearchBox(content::RenderFrame* render_frame); |
| 51 ~SearchBox() override; | 52 ~SearchBox() override; |
| 52 | 53 |
| 53 // Sends LogEvent to the browser. | 54 // Sends LogEvent to the browser. |
| 54 void LogEvent(NTPLoggingEventType event); | 55 void LogEvent(NTPLoggingEventType event); |
| 55 | 56 |
| 56 // Sends LogMostVisitedImpression to the browser. | 57 // Sends LogMostVisitedImpression to the browser. |
| 57 void LogMostVisitedImpression(int position, | 58 void LogMostVisitedImpression(int position, |
| 58 ntp_tiles::TileSource tile_source); | 59 ntp_tiles::TileSource tile_source, |
| 60 ntp_tiles::TileVisualType tile_type); |
| 59 | 61 |
| 60 // Sends LogMostVisitedNavigation to the browser. | 62 // Sends LogMostVisitedNavigation to the browser. |
| 61 void LogMostVisitedNavigation(int position, | 63 void LogMostVisitedNavigation(int position, |
| 62 ntp_tiles::TileSource tile_source); | 64 ntp_tiles::TileSource tile_source, |
| 65 ntp_tiles::TileVisualType tile_type); |
| 63 | 66 |
| 64 // Sends ChromeIdentityCheck to the browser. | 67 // Sends ChromeIdentityCheck to the browser. |
| 65 void CheckIsUserSignedInToChromeAs(const base::string16& identity); | 68 void CheckIsUserSignedInToChromeAs(const base::string16& identity); |
| 66 | 69 |
| 67 // Sends HistorySyncCheck to the browser. | 70 // Sends HistorySyncCheck to the browser. |
| 68 void CheckIsUserSyncingHistory(); | 71 void CheckIsUserSyncingHistory(); |
| 69 | 72 |
| 70 // Sends DeleteMostVisitedItem to the browser. | 73 // Sends DeleteMostVisitedItem to the browser. |
| 71 void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); | 74 void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); |
| 72 | 75 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 base::string16 query_; | 176 base::string16 query_; |
| 174 EmbeddedSearchRequestParams embedded_search_request_params_; | 177 EmbeddedSearchRequestParams embedded_search_request_params_; |
| 175 InstantSuggestion suggestion_; | 178 InstantSuggestion suggestion_; |
| 176 chrome::mojom::InstantAssociatedPtr instant_service_; | 179 chrome::mojom::InstantAssociatedPtr instant_service_; |
| 177 mojo::AssociatedBinding<chrome::mojom::SearchBox> binding_; | 180 mojo::AssociatedBinding<chrome::mojom::SearchBox> binding_; |
| 178 | 181 |
| 179 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 182 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 180 }; | 183 }; |
| 181 | 184 |
| 182 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 185 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |