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

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

Issue 14497003: Moves TabNavigation into components/sessions and renames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really remove webkit_support Created 7 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 | Annotate | Revision Log
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 #include "chrome/browser/ui/search/instant_controller.h" 5 #include "chrome/browser/ui/search/instant_controller.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/search_engines/template_url_service.h" 21 #include "chrome/browser/search_engines/template_url_service.h"
22 #include "chrome/browser/search_engines/template_url_service_factory.h" 22 #include "chrome/browser/search_engines/template_url_service_factory.h"
23 #include "chrome/browser/ui/browser_instant_controller.h" 23 #include "chrome/browser/ui/browser_instant_controller.h"
24 #include "chrome/browser/ui/search/instant_ntp.h" 24 #include "chrome/browser/ui/search/instant_ntp.h"
25 #include "chrome/browser/ui/search/instant_overlay.h" 25 #include "chrome/browser/ui/search/instant_overlay.h"
26 #include "chrome/browser/ui/search/instant_tab.h" 26 #include "chrome/browser/ui/search/instant_tab.h"
27 #include "chrome/browser/ui/search/search_tab_helper.h" 27 #include "chrome/browser/ui/search/search_tab_helper.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
31 #include "components/sessions/serialized_navigation_entry.h"
31 #include "content/public/browser/navigation_entry.h" 32 #include "content/public/browser/navigation_entry.h"
32 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
33 #include "content/public/browser/render_process_host.h" 34 #include "content/public/browser/render_process_host.h"
34 #include "content/public/browser/render_widget_host_view.h" 35 #include "content/public/browser/render_widget_host_view.h"
35 #include "content/public/browser/user_metrics.h" 36 #include "content/public/browser/user_metrics.h"
36 #include "content/public/browser/web_contents.h" 37 #include "content/public/browser/web_contents.h"
37 #include "content/public/browser/web_contents_view.h" 38 #include "content/public/browser/web_contents_view.h"
38 #include "net/base/escape.h" 39 #include "net/base/escape.h"
39 #include "third_party/icu/public/common/unicode/normalizer2.h" 40 #include "third_party/icu/public/common/unicode/normalizer2.h"
40 41
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return; 185 return;
185 186
186 const content::NavigationEntry* active_entry = controller->GetActiveEntry(); 187 const content::NavigationEntry* active_entry = controller->GetActiveEntry();
187 content::NavigationEntry* transient = controller->CreateNavigationEntry( 188 content::NavigationEntry* transient = controller->CreateNavigationEntry(
188 active_entry->GetURL(), 189 active_entry->GetURL(),
189 active_entry->GetReferrer(), 190 active_entry->GetReferrer(),
190 active_entry->GetTransitionType(), 191 active_entry->GetTransitionType(),
191 false, 192 false,
192 std::string(), 193 std::string(),
193 contents->GetBrowserContext()); 194 contents->GetBrowserContext());
194 transient->SetExtraData(chrome::kInstantExtendedSearchTermsKey, search_terms); 195 transient->SetExtraData(sessions::kSearchTermsKey, search_terms);
195 controller->SetTransientEntry(transient); 196 controller->SetTransientEntry(transient);
196 197
197 SearchTabHelper::FromWebContents(contents)->NavigationEntryUpdated(); 198 SearchTabHelper::FromWebContents(contents)->NavigationEntryUpdated();
198 } 199 }
199 200
200 bool GetURLForMostVisitedItemID(Profile* profile, 201 bool GetURLForMostVisitedItemID(Profile* profile,
201 InstantRestrictedID most_visited_item_id, 202 InstantRestrictedID most_visited_item_id,
202 GURL* url) { 203 GURL* url) {
203 InstantService* instant_service = 204 InstantService* instant_service =
204 InstantServiceFactory::GetForProfile(profile); 205 InstantServiceFactory::GetForProfile(profile);
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 return false; 1681 return false;
1681 1682
1682 // If this is not window startup, switch. 1683 // If this is not window startup, switch.
1683 // TODO(shishir): This is not completely reliable. Find a better way to detect 1684 // TODO(shishir): This is not completely reliable. Find a better way to detect
1684 // startup time. 1685 // startup time.
1685 if (browser_->GetActiveWebContents()) 1686 if (browser_->GetActiveWebContents())
1686 return true; 1687 return true;
1687 1688
1688 return chrome::IsAggressiveLocalNTPFallbackEnabled(); 1689 return chrome::IsAggressiveLocalNTPFallbackEnabled();
1689 } 1690 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/global_history_menu.cc ('k') | chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698