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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // (3) An InstantTab instance which points to the currently active tab, if it | 60 // (3) An InstantTab instance which points to the currently active tab, if it |
61 // supports the Embedded Search API. | 61 // supports the Embedded Search API. |
62 // | 62 // |
63 // All three are backed by a WebContents. InstantOverlay and InstantNTP own | 63 // All three are backed by a WebContents. InstantOverlay and InstantNTP own |
64 // their corresponding WebContents; InstantTab does not. In non-extended mode, | 64 // their corresponding WebContents; InstantTab does not. In non-extended mode, |
65 // only an InstantOverlay instance is kept. | 65 // only an InstantOverlay instance is kept. |
66 // | 66 // |
67 // InstantController is owned by Browser via BrowserInstantController. | 67 // InstantController is owned by Browser via BrowserInstantController. |
68 class InstantController : public InstantPage::Delegate { | 68 class InstantController : public InstantPage::Delegate { |
69 public: | 69 public: |
70 // The URL for the local omnibox popup. | |
71 static const char* kLocalOmniboxPopupURL; | |
72 | |
73 InstantController(chrome::BrowserInstantController* browser, | 70 InstantController(chrome::BrowserInstantController* browser, |
74 bool extended_enabled); | 71 bool extended_enabled); |
75 virtual ~InstantController(); | 72 virtual ~InstantController(); |
76 | 73 |
77 // Invoked as the user types into the omnibox. |user_text| is what the user | 74 // Invoked as the user types into the omnibox. |user_text| is what the user |
78 // has typed. |full_text| is what the omnibox is showing. These may differ if | 75 // has typed. |full_text| is what the omnibox is showing. These may differ if |
79 // the user typed only some text, and the rest was inline autocompleted. If | 76 // the user typed only some text, and the rest was inline autocompleted. If |
80 // |verbatim| is true, search results are shown for the exact omnibox text, | 77 // |verbatim| is true, search results are shown for the exact omnibox text, |
81 // rather than the best guess as to what the user means. Returns true if the | 78 // rather than the best guess as to what the user means. Returns true if the |
82 // update is accepted (i.e., if |match| is a search rather than a URL). | 79 // update is accepted (i.e., if |match| is a search rather than a URL). |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 385 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
389 bool allow_preview_to_show_search_suggestions_; | 386 bool allow_preview_to_show_search_suggestions_; |
390 | 387 |
391 // List of events and their timestamps, useful in debugging Instant behaviour. | 388 // List of events and their timestamps, useful in debugging Instant behaviour. |
392 mutable std::list<std::pair<int64, std::string> > debug_events_; | 389 mutable std::list<std::pair<int64, std::string> > debug_events_; |
393 | 390 |
394 DISALLOW_COPY_AND_ASSIGN(InstantController); | 391 DISALLOW_COPY_AND_ASSIGN(InstantController); |
395 }; | 392 }; |
396 | 393 |
397 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 394 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |