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) = 0; |
| 69 |
67 protected: | 70 protected: |
68 virtual ~Delegate(); | 71 virtual ~Delegate(); |
69 }; | 72 }; |
70 | 73 |
71 // Doesn't take ownership of |delegate|. | 74 // Doesn't take ownership of |delegate|. |
72 explicit InstantClient(Delegate* delegate); | 75 explicit InstantClient(Delegate* delegate); |
73 virtual ~InstantClient(); | 76 virtual ~InstantClient(); |
74 | 77 |
75 // Sets |contents| as the page to communicate with. |contents| can be NULL, | 78 // Sets |contents| as the page to communicate with. |contents| can be NULL, |
76 // which effectively stops all communication. | 79 // which effectively stops all communication. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 142 |
140 void SetSuggestions(int page_id, | 143 void SetSuggestions(int page_id, |
141 const std::vector<InstantSuggestion>& suggestions); | 144 const std::vector<InstantSuggestion>& suggestions); |
142 void InstantSupportDetermined(int page_id, bool result); | 145 void InstantSupportDetermined(int page_id, bool result); |
143 void ShowInstantPreview(int page_id, | 146 void ShowInstantPreview(int page_id, |
144 InstantShownReason reason, | 147 InstantShownReason reason, |
145 int height, | 148 int height, |
146 InstantSizeUnits units); | 149 InstantSizeUnits units); |
147 void StartCapturingKeyStrokes(int page_id); | 150 void StartCapturingKeyStrokes(int page_id); |
148 void StopCapturingKeyStrokes(int page_id); | 151 void StopCapturingKeyStrokes(int page_id); |
| 152 void SearchBoxNavigate(int page_id, const GURL& url); |
149 | 153 |
150 Delegate* const delegate_; | 154 Delegate* const delegate_; |
151 | 155 |
152 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 156 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
153 }; | 157 }; |
154 | 158 |
155 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 159 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
OLD | NEW |