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/base/window_open_disposition.h" |
25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
26 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.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 { |
(...skipping 128 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, SetWithTemplateURL); | 180 FRIEND_TEST_ALL_PREFIXES(InstantTest, SetWithTemplateURL); |
178 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); | 181 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); |
179 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); | 182 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); |
180 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ExtendedModeIsOn); | 183 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ExtendedModeIsOn); |
181 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, OmniboxFocusLoadsInstant); | 184 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, OmniboxFocusLoadsInstant); |
182 | 185 |
183 // Helper for OmniboxFocusChanged. Commit or discard the preview. | 186 // Helper for OmniboxFocusChanged. Commit or discard the preview. |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 327 |
325 // Whether to allow the preview to show search suggestions. In general, the | 328 // Whether to allow the preview to show search suggestions. In general, the |
326 // preview is allowed to show search suggestions whenever |search_mode_| is | 329 // preview is allowed to show search suggestions whenever |search_mode_| is |
327 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 330 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
328 bool allow_preview_to_show_search_suggestions_; | 331 bool allow_preview_to_show_search_suggestions_; |
329 | 332 |
330 DISALLOW_COPY_AND_ASSIGN(InstantController); | 333 DISALLOW_COPY_AND_ASSIGN(InstantController); |
331 }; | 334 }; |
332 | 335 |
333 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 336 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |