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

Side by Side Diff: chrome/browser/history/history_tab_helper.cc

Issue 18223002: InstantExtended: Remove overlay control code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Call renamed method. Created 7 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/history/history_tab_helper.h" 5 #include "chrome/browser/history/history_tab_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/history/history_service.h" 9 #include "chrome/browser/history/history_service.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
11 #include "chrome/browser/prerender/prerender_contents.h" 11 #include "chrome/browser/prerender/prerender_contents.h"
12 #include "chrome/browser/prerender/prerender_manager.h" 12 #include "chrome/browser/prerender/prerender_manager.h"
13 #include "chrome/browser/prerender/prerender_manager_factory.h" 13 #include "chrome/browser/prerender/prerender_manager_factory.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/search/instant_overlay.h"
16 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
17 #include "content/public/browser/navigation_details.h" 16 #include "content/public/browser/navigation_details.h"
18 #include "content/public/browser/navigation_entry.h" 17 #include "content/public/browser/navigation_entry.h"
19 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
20 #include "content/public/browser/notification_source.h" 19 #include "content/public/browser/notification_source.h"
21 #include "content/public/browser/notification_types.h" 20 #include "content/public/browser/notification_types.h"
22 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
23 #include "content/public/browser/web_contents_delegate.h" 22 #include "content/public/browser/web_contents_delegate.h"
24 #include "content/public/common/frame_navigate_params.h" 23 #include "content/public/common/frame_navigate_params.h"
25 24
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Profile::FromBrowserContext(web_contents()->GetBrowserContext())); 120 Profile::FromBrowserContext(web_contents()->GetBrowserContext()));
122 if (prerender_manager) { 121 if (prerender_manager) {
123 prerender::PrerenderContents* prerender_contents = 122 prerender::PrerenderContents* prerender_contents =
124 prerender_manager->GetPrerenderContents(web_contents()); 123 prerender_manager->GetPrerenderContents(web_contents());
125 if (prerender_contents) { 124 if (prerender_contents) {
126 prerender_contents->DidNavigate(add_page_args); 125 prerender_contents->DidNavigate(add_page_args);
127 return; 126 return;
128 } 127 }
129 } 128 }
130 129
131 InstantOverlay* instant_overlay =
132 InstantOverlay::FromWebContents(web_contents());
133 if (instant_overlay) {
134 instant_overlay->DidNavigate(add_page_args);
135 return;
136 }
137
138 #if !defined(OS_ANDROID) 130 #if !defined(OS_ANDROID)
139 // Don't update history if this web contents isn't associatd with a tab. 131 // Don't update history if this web contents isn't associatd with a tab.
140 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); 132 Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
141 if (!browser || browser->is_app()) 133 if (!browser || browser->is_app())
142 return; 134 return;
143 #endif 135 #endif
144 136
145 UpdateHistoryForNavigation(add_page_args); 137 UpdateHistoryForNavigation(add_page_args);
146 } 138 }
147 139
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 HistoryService* hs = 198 HistoryService* hs =
207 HistoryServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS); 199 HistoryServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS);
208 if (hs) { 200 if (hs) {
209 NavigationEntry* entry = tab->GetController().GetLastCommittedEntry(); 201 NavigationEntry* entry = tab->GetController().GetLastCommittedEntry();
210 if (entry) { 202 if (entry) {
211 hs->UpdateWithPageEndTime(tab, entry->GetPageID(), tab->GetURL(), 203 hs->UpdateWithPageEndTime(tab, entry->GetPageID(), tab->GetURL(),
212 base::Time::Now()); 204 base::Time::Now());
213 } 205 }
214 } 206 }
215 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698