| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // |url|. If the |transient_url| is invalid, returns false and |url| is not | 124 // |url|. If the |transient_url| is invalid, returns false and |url| is not |
| 125 // set. | 125 // set. |
| 126 // | 126 // |
| 127 // Valid form of |transient_url|: | 127 // Valid form of |transient_url|: |
| 128 // chrome-search://thumb/<render_view_id>/<most_visited_item_id> | 128 // chrome-search://thumb/<render_view_id>/<most_visited_item_id> |
| 129 bool GenerateThumbnailURLFromTransientURL(const GURL& transient_url, | 129 bool GenerateThumbnailURLFromTransientURL(const GURL& transient_url, |
| 130 GURL* url) const; | 130 GURL* url) const; |
| 131 | 131 |
| 132 // Generates the favicon URL of the most visited item specified by the | 132 // Generates the favicon URL of the most visited item specified by the |
| 133 // |transient_url|. If the |transient_url| is valid, returns true and fills in | 133 // |transient_url|. If the |transient_url| is valid, returns true and fills in |
| 134 // |url|. If the |transient_url| is invalid, returns false and |url| is not | 134 // |url|. If the |transient_url| is invalid, returns true and |url| is set to |
| 135 // set. | 135 // "chrome-search://favicon/" in order to prevent the invalid URL to be |
| 136 // requested. |
| 136 // | 137 // |
| 137 // Valid form of |transient_url|: | 138 // Valid forms of |transient_url|: |
| 138 // chrome-search://favicon/<render_view_id>/<most_visited_item_id> | 139 // chrome-search://favicon/<view_id>/<restricted_id> |
| 140 // chrome-search://favicon/<favicon_parameters>/<view_id>/<restricted_id> |
| 139 bool GenerateFaviconURLFromTransientURL(const GURL& transient_url, | 141 bool GenerateFaviconURLFromTransientURL(const GURL& transient_url, |
| 140 GURL* url) const; | 142 GURL* url) const; |
| 141 | 143 |
| 142 private: | 144 private: |
| 143 // Overridden from content::RenderViewObserver: | 145 // Overridden from content::RenderViewObserver: |
| 144 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 146 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 145 | 147 |
| 146 void OnChange(const string16& query, | 148 void OnChange(const string16& query, |
| 147 bool verbatim, | 149 bool verbatim, |
| 148 size_t selection_start, | 150 size_t selection_start, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 size_t omnibox_font_size_; | 204 size_t omnibox_font_size_; |
| 203 bool app_launcher_enabled_; | 205 bool app_launcher_enabled_; |
| 204 InstantRestrictedIDCache<InstantAutocompleteResult> | 206 InstantRestrictedIDCache<InstantAutocompleteResult> |
| 205 autocomplete_results_cache_; | 207 autocomplete_results_cache_; |
| 206 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 208 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
| 207 | 209 |
| 208 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 210 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 209 }; | 211 }; |
| 210 | 212 |
| 211 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 213 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |