| 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_INSTANT_PAGE_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 content::WebContents* contents() const { return web_contents(); } | 101 content::WebContents* contents() const { return web_contents(); } |
| 102 | 102 |
| 103 // Returns true if the page is known to support the Instant API. This starts | 103 // Returns true if the page is known to support the Instant API. This starts |
| 104 // out false, and is set to true whenever we get any message from the page. | 104 // out false, and is set to true whenever we get any message from the page. |
| 105 // Once true, it never becomes false (the page isn't expected to drop API | 105 // Once true, it never becomes false (the page isn't expected to drop API |
| 106 // support suddenly). | 106 // support suddenly). |
| 107 bool supports_instant() const { return supports_instant_; } | 107 bool supports_instant() const { return supports_instant_; } |
| 108 | 108 |
| 109 // Returns true if the page is the local NTP (i.e. its URL is | 109 // Returns true if the page is the local NTP (i.e. its URL is |
| 110 // chrome::kChromeSearchLocalNTPURL). | 110 // chrome::kChromeSearchLocalNTPURL). |
| 111 bool IsLocalNTP() const; | 111 bool IsLocal() const; |
| 112 | |
| 113 // Returns true if the page is the local overlay (i.e. its URL is | |
| 114 // chrome::kChromeSearchLocalOmniboxPopupURL). | |
| 115 bool IsLocalOverlay() const; | |
| 116 | 112 |
| 117 // Tells the page that the user typed |text| into the omnibox. If |verbatim| | 113 // Tells the page that the user typed |text| into the omnibox. If |verbatim| |
| 118 // is false, the page predicts the query the user means to type and fetches | 114 // is false, the page predicts the query the user means to type and fetches |
| 119 // results for the prediction. If |verbatim| is true, |text| is taken as the | 115 // results for the prediction. If |verbatim| is true, |text| is taken as the |
| 120 // exact query (no prediction is made). |selection_start| and |selection_end| | 116 // exact query (no prediction is made). |selection_start| and |selection_end| |
| 121 // mark the inline autocompleted portion (i.e., blue highlighted text). The | 117 // mark the inline autocompleted portion (i.e., blue highlighted text). The |
| 122 // omnibox caret (cursor) is at |selection_end|. | 118 // omnibox caret (cursor) is at |selection_end|. |
| 123 virtual void Update(const string16& text, | 119 virtual void Update(const string16& text, |
| 124 size_t selection_start, | 120 size_t selection_start, |
| 125 size_t selection_end, | 121 size_t selection_end, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void OnUndoMostVisitedDeletion(InstantRestrictedID most_visited_item_id); | 227 void OnUndoMostVisitedDeletion(InstantRestrictedID most_visited_item_id); |
| 232 void OnUndoAllMostVisitedDeletions(); | 228 void OnUndoAllMostVisitedDeletions(); |
| 233 | 229 |
| 234 Delegate* const delegate_; | 230 Delegate* const delegate_; |
| 235 bool supports_instant_; | 231 bool supports_instant_; |
| 236 | 232 |
| 237 DISALLOW_COPY_AND_ASSIGN(InstantPage); | 233 DISALLOW_COPY_AND_ASSIGN(InstantPage); |
| 238 }; | 234 }; |
| 239 | 235 |
| 240 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 236 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
| OLD | NEW |