Chromium Code Reviews| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 InstantSizeUnits units) = 0; | 51 InstantSizeUnits units) = 0; |
| 52 | 52 |
| 53 // Called when the page wants the browser to start capturing user key | 53 // Called when the page wants the browser to start capturing user key |
| 54 // strokes. | 54 // strokes. |
| 55 virtual void StartCapturingKeyStrokes() = 0; | 55 virtual void StartCapturingKeyStrokes() = 0; |
| 56 | 56 |
| 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 SearchBox wants to commit the page and navigate to the | |
| 62 // specified URL. | |
| 63 virtual void NavigateToURL(const GURL& url) = 0; | |
| 64 | |
| 61 protected: | 65 protected: |
| 62 virtual ~Delegate(); | 66 virtual ~Delegate(); |
| 63 }; | 67 }; |
| 64 | 68 |
| 65 // Doesn't take ownership of |delegate|. | 69 // Doesn't take ownership of |delegate|. |
| 66 explicit InstantClient(Delegate* delegate); | 70 explicit InstantClient(Delegate* delegate); |
| 67 virtual ~InstantClient(); | 71 virtual ~InstantClient(); |
| 68 | 72 |
| 69 // Sets |contents| as the page to communicate with. |contents| can be NULL, | 73 // Sets |contents| as the page to communicate with. |contents| can be NULL, |
| 70 // which effectively stops all communication. | 74 // which effectively stops all communication. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 | 130 |
| 127 void SetSuggestions(int page_id, | 131 void SetSuggestions(int page_id, |
| 128 const std::vector<InstantSuggestion>& suggestions); | 132 const std::vector<InstantSuggestion>& suggestions); |
| 129 void InstantSupportDetermined(int page_id, bool result); | 133 void InstantSupportDetermined(int page_id, bool result); |
| 130 void ShowInstantPreview(int page_id, | 134 void ShowInstantPreview(int page_id, |
| 131 InstantShownReason reason, | 135 InstantShownReason reason, |
| 132 int height, | 136 int height, |
| 133 InstantSizeUnits units); | 137 InstantSizeUnits units); |
| 134 void StartCapturingKeyStrokes(int page_id); | 138 void StartCapturingKeyStrokes(int page_id); |
| 135 void StopCapturingKeyStrokes(int page_id); | 139 void StopCapturingKeyStrokes(int page_id); |
| 140 void SearchBoxNavigate(int page_id, const GURL& url); | |
|
samarth
2012/12/07 02:01:35
nit: keep the same name as in the Delegate, i.e. N
Shishir
2012/12/10 20:40:39
This name is consistent with the IPC name which is
| |
| 136 | 141 |
| 137 Delegate* const delegate_; | 142 Delegate* const delegate_; |
| 138 | 143 |
| 139 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 144 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
| 140 }; | 145 }; |
| 141 | 146 |
| 142 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 147 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
| OLD | NEW |