| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 virtual void InstantPageAboutToNavigateMainFrame( | 241 virtual void InstantPageAboutToNavigateMainFrame( |
| 241 const content::WebContents* contents, | 242 const content::WebContents* contents, |
| 242 const GURL& url) OVERRIDE; | 243 const GURL& url) OVERRIDE; |
| 243 virtual void SetSuggestions( | 244 virtual void SetSuggestions( |
| 244 const content::WebContents* contents, | 245 const content::WebContents* contents, |
| 245 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; | 246 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; |
| 246 virtual void ShowInstantOverlay( | 247 virtual void ShowInstantOverlay( |
| 247 const content::WebContents* contents, | 248 const content::WebContents* contents, |
| 248 int height, | 249 int height, |
| 249 InstantSizeUnits units) OVERRIDE; | 250 InstantSizeUnits units) OVERRIDE; |
| 250 virtual void FocusOmnibox(const content::WebContents* contents) OVERRIDE; | 251 virtual void FocusOmnibox(const content::WebContents* contents, |
| 251 virtual void StartCapturingKeyStrokes( | 252 OmniboxFocusState state) OVERRIDE; |
| 252 const content::WebContents* contents) OVERRIDE; | |
| 253 virtual void StopCapturingKeyStrokes(content::WebContents* contents) OVERRIDE; | |
| 254 virtual void NavigateToURL( | 253 virtual void NavigateToURL( |
| 255 const content::WebContents* contents, | 254 const content::WebContents* contents, |
| 256 const GURL& url, | 255 const GURL& url, |
| 257 content::PageTransition transition, | 256 content::PageTransition transition, |
| 258 WindowOpenDisposition disposition) OVERRIDE; | 257 WindowOpenDisposition disposition) OVERRIDE; |
| 259 | 258 |
| 260 // Invoked by the InstantLoader when the Instant page wants to delete a | 259 // Invoked by the InstantLoader when the Instant page wants to delete a |
| 261 // Most Visited item. | 260 // Most Visited item. |
| 262 virtual void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id) | 261 virtual void DeleteMostVisitedItem(InstantRestrictedID most_visited_item_id) |
| 263 OVERRIDE; | 262 OVERRIDE; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 // Used for Top Sites async retrieval. | 464 // Used for Top Sites async retrieval. |
| 466 base::WeakPtrFactory<InstantController> weak_ptr_factory_; | 465 base::WeakPtrFactory<InstantController> weak_ptr_factory_; |
| 467 | 466 |
| 468 // Used to get notifications about Most Visted changes. | 467 // Used to get notifications about Most Visted changes. |
| 469 content::NotificationRegistrar registrar_; | 468 content::NotificationRegistrar registrar_; |
| 470 | 469 |
| 471 DISALLOW_COPY_AND_ASSIGN(InstantController); | 470 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 472 }; | 471 }; |
| 473 | 472 |
| 474 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 473 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
| OLD | NEW |