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_UI_SEARCH_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/string16.h" | 17 #include "base/string16.h" |
18 #include "base/time.h" | 18 #include "base/time.h" |
19 #include "base/timer.h" | 19 #include "base/timer.h" |
20 #include "chrome/browser/history/history_types.h" | 20 #include "chrome/browser/history/history_types.h" |
21 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 21 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
22 #include "chrome/browser/ui/search/instant_commit_type.h" | 22 #include "chrome/browser/ui/search/instant_commit_type.h" |
23 #include "chrome/browser/ui/search/instant_overlay_model.h" | 23 #include "chrome/browser/ui/search/instant_overlay_model.h" |
24 #include "chrome/browser/ui/search/instant_page.h" | 24 #include "chrome/browser/ui/search/instant_page.h" |
25 #include "chrome/common/instant_types.h" | 25 #include "chrome/common/instant_types.h" |
| 26 #include "chrome/common/omnibox_focus_state.h" |
26 #include "chrome/common/search_types.h" | 27 #include "chrome/common/search_types.h" |
27 #include "content/public/browser/notification_observer.h" | 28 #include "content/public/browser/notification_observer.h" |
28 #include "content/public/browser/notification_registrar.h" | 29 #include "content/public/browser/notification_registrar.h" |
29 #include "content/public/common/page_transition_types.h" | 30 #include "content/public/common/page_transition_types.h" |
30 #include "googleurl/src/gurl.h" | 31 #include "googleurl/src/gurl.h" |
31 #include "ui/base/window_open_disposition.h" | 32 #include "ui/base/window_open_disposition.h" |
32 #include "ui/gfx/native_widget_types.h" | 33 #include "ui/gfx/native_widget_types.h" |
33 #include "ui/gfx/rect.h" | 34 #include "ui/gfx/rect.h" |
34 | 35 |
35 struct AutocompleteMatch; | 36 struct AutocompleteMatch; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 virtual void InstantPageAboutToNavigateMainFrame( | 239 virtual void InstantPageAboutToNavigateMainFrame( |
239 const content::WebContents* contents, | 240 const content::WebContents* contents, |
240 const GURL& url) OVERRIDE; | 241 const GURL& url) OVERRIDE; |
241 virtual void SetSuggestions( | 242 virtual void SetSuggestions( |
242 const content::WebContents* contents, | 243 const content::WebContents* contents, |
243 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; | 244 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; |
244 virtual void ShowInstantOverlay( | 245 virtual void ShowInstantOverlay( |
245 const content::WebContents* contents, | 246 const content::WebContents* contents, |
246 int height, | 247 int height, |
247 InstantSizeUnits units) OVERRIDE; | 248 InstantSizeUnits units) OVERRIDE; |
248 virtual void FocusOmnibox(const content::WebContents* contents) OVERRIDE; | 249 virtual void FocusOmnibox(const content::WebContents* contents, |
249 virtual void StartCapturingKeyStrokes( | 250 OmniboxFocusState state) OVERRIDE; |
250 const content::WebContents* contents) OVERRIDE; | |
251 virtual void StopCapturingKeyStrokes(content::WebContents* contents) OVERRIDE; | |
252 virtual void NavigateToURL( | 251 virtual void NavigateToURL( |
253 const content::WebContents* contents, | 252 const content::WebContents* contents, |
254 const GURL& url, | 253 const GURL& url, |
255 content::PageTransition transition, | 254 content::PageTransition transition, |
256 WindowOpenDisposition disposition) OVERRIDE; | 255 WindowOpenDisposition disposition) OVERRIDE; |
257 | 256 |
258 // Invoked by the InstantLoader when the Instant page wants to delete a | 257 // Invoked by the InstantLoader when the Instant page wants to delete a |
259 // Most Visited item. | 258 // Most Visited item. |
260 virtual void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id) | 259 virtual void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id) |
261 OVERRIDE; | 260 OVERRIDE; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // Used for Top Sites async retrieval. | 463 // Used for Top Sites async retrieval. |
465 base::WeakPtrFactory<InstantController> weak_ptr_factory_; | 464 base::WeakPtrFactory<InstantController> weak_ptr_factory_; |
466 | 465 |
467 // Used to get notifications about Most Visted changes. | 466 // Used to get notifications about Most Visted changes. |
468 content::NotificationRegistrar registrar_; | 467 content::NotificationRegistrar registrar_; |
469 | 468 |
470 DISALLOW_COPY_AND_ASSIGN(InstantController); | 469 DISALLOW_COPY_AND_ASSIGN(InstantController); |
471 }; | 470 }; |
472 | 471 |
473 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 472 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
OLD | NEW |