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" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "chrome/common/instant_types.h" | 13 #include "chrome/common/instant_types.h" |
14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 15 #include "webkit/glue/window_open_disposition.h" |
15 | 16 |
16 namespace chrome { | 17 namespace chrome { |
17 namespace search { | 18 namespace search { |
18 struct Mode; | 19 struct Mode; |
19 } | 20 } |
20 } | 21 } |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 class WebContents; | 24 class WebContents; |
24 } | 25 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 virtual void StopCapturingKeyStrokes() = 0; | 60 virtual void StopCapturingKeyStrokes() = 0; |
60 | 61 |
61 // Called when the underlying RenderView crashes. | 62 // Called when the underlying RenderView crashes. |
62 virtual void RenderViewGone() = 0; | 63 virtual void RenderViewGone() = 0; |
63 | 64 |
64 // Called when the page is about to navigate. | 65 // Called when the page is about to navigate. |
65 virtual void AboutToNavigateMainFrame(const GURL& url) = 0; | 66 virtual void AboutToNavigateMainFrame(const GURL& url) = 0; |
66 | 67 |
67 // Called when the SearchBox wants to navigate to the specified URL. | 68 // Called when the SearchBox wants to navigate to the specified URL. |
68 virtual void NavigateToURL(const GURL& url, | 69 virtual void NavigateToURL(const GURL& url, |
69 content::PageTransition transition) = 0; | 70 content::PageTransition transition, |
| 71 WindowOpenDisposition disposition) = 0; |
70 | 72 |
71 protected: | 73 protected: |
72 virtual ~Delegate(); | 74 virtual ~Delegate(); |
73 }; | 75 }; |
74 | 76 |
75 // Doesn't take ownership of |delegate|. | 77 // Doesn't take ownership of |delegate|. |
76 explicit InstantClient(Delegate* delegate); | 78 explicit InstantClient(Delegate* delegate); |
77 virtual ~InstantClient(); | 79 virtual ~InstantClient(); |
78 | 80 |
79 // Sets |contents| as the page to communicate with. |contents| can be NULL, | 81 // Sets |contents| as the page to communicate with. |contents| can be NULL, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 void SetSuggestions(int page_id, | 152 void SetSuggestions(int page_id, |
151 const std::vector<InstantSuggestion>& suggestions); | 153 const std::vector<InstantSuggestion>& suggestions); |
152 void InstantSupportDetermined(int page_id, bool result); | 154 void InstantSupportDetermined(int page_id, bool result); |
153 void ShowInstantPreview(int page_id, | 155 void ShowInstantPreview(int page_id, |
154 InstantShownReason reason, | 156 InstantShownReason reason, |
155 int height, | 157 int height, |
156 InstantSizeUnits units); | 158 InstantSizeUnits units); |
157 void StartCapturingKeyStrokes(int page_id); | 159 void StartCapturingKeyStrokes(int page_id); |
158 void StopCapturingKeyStrokes(int page_id); | 160 void StopCapturingKeyStrokes(int page_id); |
159 void SearchBoxNavigate(int page_id, const GURL& url, | 161 void SearchBoxNavigate(int page_id, const GURL& url, |
160 content::PageTransition transition); | 162 content::PageTransition transition, |
| 163 WindowOpenDisposition disposition); |
161 | 164 |
162 Delegate* const delegate_; | 165 Delegate* const delegate_; |
163 | 166 |
164 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 167 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
165 }; | 168 }; |
166 | 169 |
167 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 170 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
OLD | NEW |