| 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 18 matching lines...) Expand all Loading... |
| 29 virtual ~SearchBox(); | 29 virtual ~SearchBox(); |
| 30 | 30 |
| 31 // Sends ChromeViewHostMsg_CountMouseover to the browser. | 31 // Sends ChromeViewHostMsg_CountMouseover to the browser. |
| 32 void CountMouseover(); | 32 void CountMouseover(); |
| 33 | 33 |
| 34 // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser. | 34 // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser. |
| 35 void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); | 35 void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); |
| 36 | 36 |
| 37 // Generates the favicon URL of the most visited item specified by the | 37 // Generates the favicon URL of the most visited item specified by the |
| 38 // |transient_url|. If the |transient_url| is valid, returns true and fills in | 38 // |transient_url|. If the |transient_url| is valid, returns true and fills in |
| 39 // |url|. If the |transient_url| is invalid, returns false and |url| is not | 39 // |url|. If the |transient_url| is invalid, returns true and |url| is set to |
| 40 // set. | 40 // "chrome-search://favicon/" in order to prevent the invalid URL to be |
| 41 // requested. |
| 41 // | 42 // |
| 42 // Valid form of |transient_url|: | 43 // Valid forms of |transient_url|: |
| 43 // chrome-search://favicon/<render_view_id>/<most_visited_item_id> | 44 // chrome-search://favicon/<view_id>/<restricted_id> |
| 45 // chrome-search://favicon/<favicon_parameters>/<view_id>/<restricted_id> |
| 44 bool GenerateFaviconURLFromTransientURL(const GURL& transient_url, | 46 bool GenerateFaviconURLFromTransientURL(const GURL& transient_url, |
| 45 GURL* url) const; | 47 GURL* url) const; |
| 46 | 48 |
| 47 // Generates the thumbnail URL of the most visited item specified by the | 49 // Generates the thumbnail URL of the most visited item specified by the |
| 48 // |transient_url|. If the |transient_url| is valid, returns true and fills in | 50 // |transient_url|. If the |transient_url| is valid, returns true and fills in |
| 49 // |url|. If the |transient_url| is invalid, returns false and |url| is not | 51 // |url|. If the |transient_url| is invalid, returns false and |url| is not |
| 50 // set. | 52 // set. |
| 51 // | 53 // |
| 52 // Valid form of |transient_url|: | 54 // Valid form of |transient_url|: |
| 53 // chrome-search://thumb/<render_view_id>/<most_visited_item_id> | 55 // chrome-search://thumb/<render_view_id>/<most_visited_item_id> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 string16 omnibox_font_; | 134 string16 omnibox_font_; |
| 133 size_t omnibox_font_size_; | 135 size_t omnibox_font_size_; |
| 134 string16 query_; | 136 string16 query_; |
| 135 int start_margin_; | 137 int start_margin_; |
| 136 int width_; | 138 int width_; |
| 137 | 139 |
| 138 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 140 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 139 }; | 141 }; |
| 140 | 142 |
| 141 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 143 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |