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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "base/timer.h" | 17 #include "base/timer.h" |
18 #include "chrome/browser/instant/instant_commit_type.h" | 18 #include "chrome/browser/instant/instant_commit_type.h" |
19 #include "chrome/browser/instant/instant_model.h" | 19 #include "chrome/browser/instant/instant_model.h" |
20 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 20 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
21 #include "chrome/common/instant_types.h" | 21 #include "chrome/common/instant_types.h" |
22 #include "chrome/common/search_types.h" | 22 #include "chrome/common/search_types.h" |
23 #include "content/public/common/page_transition_types.h" | 23 #include "content/public/common/page_transition_types.h" |
24 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
25 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
26 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
| 27 #include "webkit/glue/window_open_disposition.h" |
27 | 28 |
28 struct AutocompleteMatch; | 29 struct AutocompleteMatch; |
29 class AutocompleteProvider; | 30 class AutocompleteProvider; |
30 class InstantLoader; | 31 class InstantLoader; |
31 class InstantTab; | 32 class InstantTab; |
32 class TemplateURL; | 33 class TemplateURL; |
33 | 34 |
34 namespace chrome { | 35 namespace chrome { |
35 class BrowserInstantController; | 36 class BrowserInstantController; |
36 } | 37 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void InstantLoaderContentsFocused(); | 164 void InstantLoaderContentsFocused(); |
164 | 165 |
165 // Invoked by the InstantLoader when its RenderView crashes. | 166 // Invoked by the InstantLoader when its RenderView crashes. |
166 void InstantLoaderRenderViewGone(); | 167 void InstantLoaderRenderViewGone(); |
167 | 168 |
168 // Invoked by InstantLoader when the instant page is about to navigate. | 169 // Invoked by InstantLoader when the instant page is about to navigate. |
169 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); | 170 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); |
170 | 171 |
171 // Invoked by the InstantLoader when the instant page wants to navigate to | 172 // Invoked by the InstantLoader when the instant page wants to navigate to |
172 // the speicfied URL. | 173 // the speicfied URL. |
173 void NavigateToURL(const GURL& url, content::PageTransition transition); | 174 void NavigateToURL(const GURL& url, |
| 175 content::PageTransition transition, |
| 176 WindowOpenDisposition disposition); |
174 | 177 |
175 private: | 178 private: |
176 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); | 179 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); |
177 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); | 180 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); |
178 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); | 181 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); |
179 | 182 |
180 // Helper for OmniboxFocusChanged. Commit or discard the preview. | 183 // Helper for OmniboxFocusChanged. Commit or discard the preview. |
181 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); | 184 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); |
182 | 185 |
183 // Creates a new loader if necessary, using the instant_url property of the | 186 // Creates a new loader if necessary, using the instant_url property of the |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 324 |
322 // Whether to allow the preview to show search suggestions. In general, the | 325 // Whether to allow the preview to show search suggestions. In general, the |
323 // preview is allowed to show search suggestions whenever |search_mode_| is | 326 // preview is allowed to show search suggestions whenever |search_mode_| is |
324 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 327 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
325 bool allow_preview_to_show_search_suggestions_; | 328 bool allow_preview_to_show_search_suggestions_; |
326 | 329 |
327 DISALLOW_COPY_AND_ASSIGN(InstantController); | 330 DISALLOW_COPY_AND_ASSIGN(InstantController); |
328 }; | 331 }; |
329 | 332 |
330 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 333 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |