| 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_INSTANT_INSTANT_PAGE_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // strokes. If this call is processed successfully, the omnibox will not | 70 // strokes. If this call is processed successfully, the omnibox will not |
| 71 // look focused visibly but any user key strokes will go to the omnibox. | 71 // look focused visibly but any user key strokes will go to the omnibox. |
| 72 // Currently, this is implemented by focusing the omnibox invisibly. | 72 // Currently, this is implemented by focusing the omnibox invisibly. |
| 73 virtual void StartCapturingKeyStrokes( | 73 virtual void StartCapturingKeyStrokes( |
| 74 const content::WebContents* contents) = 0; | 74 const content::WebContents* contents) = 0; |
| 75 | 75 |
| 76 // Called when the page wants the omnibox to stop capturing user key | 76 // Called when the page wants the omnibox to stop capturing user key |
| 77 // strokes. | 77 // strokes. |
| 78 virtual void StopCapturingKeyStrokes(content::WebContents* contents) = 0; | 78 virtual void StopCapturingKeyStrokes(content::WebContents* contents) = 0; |
| 79 | 79 |
| 80 // Called when the page wants to navigate to the specified URL. Usually | 80 // Called when the page wants to navigate to |url|. Usually used by the |
| 81 // used by the page to navigate to privileged destinations (e.g. chrome:// | 81 // page to navigate to privileged destinations (e.g. chrome:// URLs) or to |
| 82 // URLs) or to navigate to URLs that are hidden from the page using | 82 // navigate to URLs that are hidden from the page using Restricted IDs (rid |
| 83 // Restricted IDs (rid in the API). | 83 // in the API). |
| 84 virtual void NavigateToURL(const content::WebContents* contents, | 84 virtual void NavigateToURL(const content::WebContents* contents, |
| 85 const GURL& url, | 85 const GURL& url, |
| 86 content::PageTransition transition) = 0; | 86 content::PageTransition transition, |
| 87 WindowOpenDisposition disposition) = 0; |
| 87 | 88 |
| 88 protected: | 89 protected: |
| 89 virtual ~Delegate(); | 90 virtual ~Delegate(); |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 virtual ~InstantPage(); | 93 virtual ~InstantPage(); |
| 93 | 94 |
| 94 // The WebContents corresponding to the page we're talking to. May be NULL. | 95 // The WebContents corresponding to the page we're talking to. May be NULL. |
| 95 content::WebContents* contents() const { return web_contents(); } | 96 content::WebContents* contents() const { return web_contents(); } |
| 96 | 97 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 198 |
| 198 void OnSetSuggestions(int page_id, | 199 void OnSetSuggestions(int page_id, |
| 199 const std::vector<InstantSuggestion>& suggestions); | 200 const std::vector<InstantSuggestion>& suggestions); |
| 200 void OnInstantSupportDetermined(int page_id, bool supports_instant); | 201 void OnInstantSupportDetermined(int page_id, bool supports_instant); |
| 201 void OnShowInstantOverlay(int page_id, | 202 void OnShowInstantOverlay(int page_id, |
| 202 InstantShownReason reason, | 203 InstantShownReason reason, |
| 203 int height, | 204 int height, |
| 204 InstantSizeUnits units); | 205 InstantSizeUnits units); |
| 205 void OnStartCapturingKeyStrokes(int page_id); | 206 void OnStartCapturingKeyStrokes(int page_id); |
| 206 void OnStopCapturingKeyStrokes(int page_id); | 207 void OnStopCapturingKeyStrokes(int page_id); |
| 207 void OnSearchBoxNavigate(int page_id, const GURL& url, | 208 void OnSearchBoxNavigate(int page_id, |
| 208 content::PageTransition transition); | 209 const GURL& url, |
| 210 content::PageTransition transition, |
| 211 WindowOpenDisposition disposition); |
| 209 | 212 |
| 210 Delegate* const delegate_; | 213 Delegate* const delegate_; |
| 211 bool supports_instant_; | 214 bool supports_instant_; |
| 212 | 215 |
| 213 DISALLOW_COPY_AND_ASSIGN(InstantPage); | 216 DISALLOW_COPY_AND_ASSIGN(InstantPage); |
| 214 }; | 217 }; |
| 215 | 218 |
| 216 #endif // CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ | 219 #endif // CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ |
| OLD | NEW |