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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void InstantLoaderContentsFocused(); | 162 void InstantLoaderContentsFocused(); |
162 | 163 |
163 // Invoked by the InstantLoader when its RenderView crashes. | 164 // Invoked by the InstantLoader when its RenderView crashes. |
164 void InstantLoaderRenderViewGone(); | 165 void InstantLoaderRenderViewGone(); |
165 | 166 |
166 // Invoked by InstantLoader when the instant page is about to navigate. | 167 // Invoked by InstantLoader when the instant page is about to navigate. |
167 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); | 168 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); |
168 | 169 |
169 // Invoked by the InstantLoader when the instant page wants to navigate to | 170 // Invoked by the InstantLoader when the instant page wants to navigate to |
170 // the speicfied URL. | 171 // the speicfied URL. |
171 void NavigateToURL(const GURL& url, content::PageTransition transition); | 172 void NavigateToURL(const GURL& url, |
| 173 content::PageTransition transition, |
| 174 WindowOpenDisposition disposition); |
172 | 175 |
173 private: | 176 private: |
174 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); | 177 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); |
175 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); | 178 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); |
176 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); | 179 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); |
177 | 180 |
178 // Helper for OmniboxFocusChanged. Commit or discard the preview. | 181 // Helper for OmniboxFocusChanged. Commit or discard the preview. |
179 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); | 182 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); |
180 | 183 |
181 // Creates a new loader if necessary, using the instant_url property of the | 184 // 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... |
319 | 322 |
320 // Whether to allow the preview to show search suggestions. In general, the | 323 // Whether to allow the preview to show search suggestions. In general, the |
321 // preview is allowed to show search suggestions whenever |search_mode_| is | 324 // preview is allowed to show search suggestions whenever |search_mode_| is |
322 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 325 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
323 bool allow_preview_to_show_search_suggestions_; | 326 bool allow_preview_to_show_search_suggestions_; |
324 | 327 |
325 DISALLOW_COPY_AND_ASSIGN(InstantController); | 328 DISALLOW_COPY_AND_ASSIGN(InstantController); |
326 }; | 329 }; |
327 | 330 |
328 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 331 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |