Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chrome/browser/ui/search/instant_controller.h

Issue 2845303002: Remove InstantTab::Delegate::InstantSupportDetermined (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 14
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/strings/string16.h"
18 #include "chrome/browser/ui/search/instant_tab.h" 17 #include "chrome/browser/ui/search/instant_tab.h"
18 #include "chrome/browser/ui/search/search_model.h"
19 #include "chrome/common/search/search_types.h" 19 #include "chrome/common/search/search_types.h"
20 20
21 class BrowserInstantController; 21 class BrowserInstantController;
22 class GURL; 22 class GURL;
23 class InstantService; 23 class InstantService;
24 24
25 namespace content { 25 namespace content {
26 class WebContents; 26 class WebContents;
27 } 27 }
28 28
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, 81 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest,
82 SearchDoesntReuseInstantTabWithoutSupport); 82 SearchDoesntReuseInstantTabWithoutSupport);
83 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, 83 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest,
84 TypedSearchURLDoesntReuseInstantTab); 84 TypedSearchURLDoesntReuseInstantTab);
85 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, 85 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest,
86 DispatchMVChangeEventWhileNavigatingBackToNTP); 86 DispatchMVChangeEventWhileNavigatingBackToNTP);
87 87
88 // Overridden from InstantTab::Delegate: 88 // Overridden from InstantTab::Delegate:
89 // TODO(shishir): We assume that the WebContent's current RenderViewHost is 89 // TODO(shishir): We assume that the WebContent's current RenderViewHost is
90 // the RenderViewHost being created which is not always true. Fix this. 90 // the RenderViewHost being created which is not always true. Fix this.
91 void InstantSupportDetermined(const content::WebContents* contents,
92 bool supports_instant) override;
93 void InstantTabAboutToNavigateMainFrame(const content::WebContents* contents, 91 void InstantTabAboutToNavigateMainFrame(const content::WebContents* contents,
94 const GURL& url) override; 92 const GURL& url) override;
95 93
96 // Adds a new event to |debug_events_| and also DVLOG's it. Ensures that 94 // Adds a new event to |debug_events_| and also DVLOG's it. Ensures that
97 // |debug_events_| doesn't get too large. 95 // |debug_events_| doesn't get too large.
98 void LogDebugEvent(const std::string& info) const; 96 void LogDebugEvent(const std::string& info) const;
99 97
100 // If the active tab is an Instant search results page, sets |instant_tab_| to 98 // If the active tab is an Instant search results page, sets |instant_tab_| to
101 // point to it. Else, deletes any existing |instant_tab_|. 99 // point to it. Else, deletes any existing |instant_tab_|.
102 void ResetInstantTab(); 100 void ResetInstantTab();
(...skipping 12 matching lines...) Expand all
115 // The search model mode for the active tab. 113 // The search model mode for the active tab.
116 SearchMode search_mode_; 114 SearchMode search_mode_;
117 115
118 // List of events and their timestamps, useful in debugging Instant behaviour. 116 // List of events and their timestamps, useful in debugging Instant behaviour.
119 mutable std::list<std::pair<int64_t, std::string>> debug_events_; 117 mutable std::list<std::pair<int64_t, std::string>> debug_events_;
120 118
121 DISALLOW_COPY_AND_ASSIGN(InstantController); 119 DISALLOW_COPY_AND_ASSIGN(InstantController);
122 }; 120 };
123 121
124 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ 122 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698