| 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_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Called when the page wants the browser to stop capturing user key | 57 // Called when the page wants the browser to stop capturing user key |
| 58 // strokes. | 58 // strokes. |
| 59 virtual void StopCapturingKeyStrokes() = 0; | 59 virtual void StopCapturingKeyStrokes() = 0; |
| 60 | 60 |
| 61 // Called when the underlying RenderView crashes. | 61 // Called when the underlying RenderView crashes. |
| 62 virtual void RenderViewGone() = 0; | 62 virtual void RenderViewGone() = 0; |
| 63 | 63 |
| 64 // Called when the page is about to navigate. | 64 // Called when the page is about to navigate. |
| 65 virtual void AboutToNavigateMainFrame(const GURL& url) = 0; | 65 virtual void AboutToNavigateMainFrame(const GURL& url) = 0; |
| 66 | 66 |
| 67 // Called when the SearchBox wants to navigate to the specified URL. |
| 68 virtual void NavigateToURL(const GURL& url, |
| 69 content::PageTransition transition) = 0; |
| 70 |
| 67 protected: | 71 protected: |
| 68 virtual ~Delegate(); | 72 virtual ~Delegate(); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 // Doesn't take ownership of |delegate|. | 75 // Doesn't take ownership of |delegate|. |
| 72 explicit InstantClient(Delegate* delegate); | 76 explicit InstantClient(Delegate* delegate); |
| 73 virtual ~InstantClient(); | 77 virtual ~InstantClient(); |
| 74 | 78 |
| 75 // Sets |contents| as the page to communicate with. |contents| can be NULL, | 79 // Sets |contents| as the page to communicate with. |contents| can be NULL, |
| 76 // which effectively stops all communication. | 80 // which effectively stops all communication. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 146 |
| 143 void SetSuggestions(int page_id, | 147 void SetSuggestions(int page_id, |
| 144 const std::vector<InstantSuggestion>& suggestions); | 148 const std::vector<InstantSuggestion>& suggestions); |
| 145 void InstantSupportDetermined(int page_id, bool result); | 149 void InstantSupportDetermined(int page_id, bool result); |
| 146 void ShowInstantPreview(int page_id, | 150 void ShowInstantPreview(int page_id, |
| 147 InstantShownReason reason, | 151 InstantShownReason reason, |
| 148 int height, | 152 int height, |
| 149 InstantSizeUnits units); | 153 InstantSizeUnits units); |
| 150 void StartCapturingKeyStrokes(int page_id); | 154 void StartCapturingKeyStrokes(int page_id); |
| 151 void StopCapturingKeyStrokes(int page_id); | 155 void StopCapturingKeyStrokes(int page_id); |
| 156 void SearchBoxNavigate(int page_id, const GURL& url, |
| 157 content::PageTransition transition); |
| 152 | 158 |
| 153 Delegate* const delegate_; | 159 Delegate* const delegate_; |
| 154 | 160 |
| 155 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 161 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
| 156 }; | 162 }; |
| 157 | 163 |
| 158 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 164 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
| OLD | NEW |