Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 // Called when the page wants to navigate to |url|. Usually used by the | 76 // Called when the page wants to navigate to |url|. Usually used by the |
| 77 // page to navigate to privileged destinations (e.g. chrome:// URLs) or to | 77 // page to navigate to privileged destinations (e.g. chrome:// URLs) or to |
| 78 // navigate to URLs that are hidden from the page using Restricted IDs (rid | 78 // navigate to URLs that are hidden from the page using Restricted IDs (rid |
| 79 // in the API). | 79 // in the API). |
| 80 virtual void NavigateToURL(const content::WebContents* contents, | 80 virtual void NavigateToURL(const content::WebContents* contents, |
| 81 const GURL& url, | 81 const GURL& url, |
| 82 content::PageTransition transition, | 82 content::PageTransition transition, |
| 83 WindowOpenDisposition disposition) = 0; | 83 WindowOpenDisposition disposition) = 0; |
| 84 | 84 |
| 85 // Called when the SearchBox wants to delete a Most Visited item. | 85 // Called when the SearchBox wants to delete a Most Visited item. |
| 86 virtual void DeleteMostVisitedItem( | 86 virtual void DeleteMostVisitedItem(const GURL& item_url) = 0; |
| 87 InstantRestrictedID most_visited_item_id) = 0; | |
| 88 | 87 |
| 89 // Called when the SearchBox wants to undo a Most Visited deletion. | 88 // Called when the SearchBox wants to undo a Most Visited deletion. |
| 90 virtual void UndoMostVisitedDeletion( | 89 virtual void UndoMostVisitedDeletion(const GURL& most_visited_item_url) = 0; |
| 91 InstantRestrictedID most_visited_item_id) = 0; | |
| 92 | 90 |
| 93 // Called when the SearchBox wants to undo all Most Visited deletions. | 91 // Called when the SearchBox wants to undo all Most Visited deletions. |
| 94 virtual void UndoAllMostVisitedDeletions() = 0; | 92 virtual void UndoAllMostVisitedDeletions() = 0; |
| 95 | 93 |
| 96 // Called when the page fails to load for whatever reason. | 94 // Called when the page fails to load for whatever reason. |
| 97 virtual void InstantPageLoadFailed(content::WebContents* contents) = 0; | 95 virtual void InstantPageLoadFailed(content::WebContents* contents) = 0; |
| 98 | 96 |
| 99 protected: | 97 protected: |
| 100 virtual ~Delegate(); | 98 virtual ~Delegate(); |
| 101 }; | 99 }; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 const std::vector<InstantSuggestion>& suggestions); | 242 const std::vector<InstantSuggestion>& suggestions); |
| 245 void OnInstantSupportDetermined(int page_id, bool supports_instant); | 243 void OnInstantSupportDetermined(int page_id, bool supports_instant); |
| 246 void OnShowInstantOverlay(int page_id, | 244 void OnShowInstantOverlay(int page_id, |
| 247 int height, | 245 int height, |
| 248 InstantSizeUnits units); | 246 InstantSizeUnits units); |
| 249 void OnFocusOmnibox(int page_id, OmniboxFocusState state); | 247 void OnFocusOmnibox(int page_id, OmniboxFocusState state); |
| 250 void OnSearchBoxNavigate(int page_id, | 248 void OnSearchBoxNavigate(int page_id, |
| 251 const GURL& url, | 249 const GURL& url, |
| 252 content::PageTransition transition, | 250 content::PageTransition transition, |
| 253 WindowOpenDisposition disposition); | 251 WindowOpenDisposition disposition); |
| 254 void OnDeleteMostVisitedItem(InstantRestrictedID most_visited_item_id); | 252 void OnDeleteMostVisitedItem(const GURL& item_url); |
|
Jered
2013/05/21 20:18:21
Just "url" is fine here and below, since the metho
kmadhusu
2013/05/23 18:26:22
Done.
| |
| 255 void OnUndoMostVisitedDeletion(InstantRestrictedID most_visited_item_id); | 253 void OnUndoMostVisitedDeletion(const GURL& most_visited_item_url); |
| 256 void OnUndoAllMostVisitedDeletions(); | 254 void OnUndoAllMostVisitedDeletions(); |
| 257 | 255 |
| 258 Delegate* const delegate_; | 256 Delegate* const delegate_; |
| 259 const std::string instant_url_; | 257 const std::string instant_url_; |
| 260 bool supports_instant_; | 258 bool supports_instant_; |
| 261 bool instant_support_determined_; | 259 bool instant_support_determined_; |
| 262 | 260 |
| 263 DISALLOW_COPY_AND_ASSIGN(InstantPage); | 261 DISALLOW_COPY_AND_ASSIGN(InstantPage); |
| 264 }; | 262 }; |
| 265 | 263 |
| 266 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 264 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
| OLD | NEW |