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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 125202: Revert 18373 - Consider a redirect following user gesture as userinitiated in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/common/render_messages_internal.h » ('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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 if (!render_manager_.dom_ui()) { 1834 if (!render_manager_.dom_ui()) {
1835 // We shouldn't get a DOM UI message when we haven't enabled the DOM UI. 1835 // We shouldn't get a DOM UI message when we haven't enabled the DOM UI.
1836 // Because the renderer might be owned and sending random messages, we need 1836 // Because the renderer might be owned and sending random messages, we need
1837 // to ignore these inproper ones. 1837 // to ignore these inproper ones.
1838 NOTREACHED(); 1838 NOTREACHED();
1839 return; 1839 return;
1840 } 1840 }
1841 render_manager_.dom_ui()->ProcessDOMUIMessage(message, content); 1841 render_manager_.dom_ui()->ProcessDOMUIMessage(message, content);
1842 } 1842 }
1843 1843
1844 void TabContents::DocumentLoadedInFrame() {
1845 controller_.DocumentLoadedInFrame();
1846 }
1847
1848 void TabContents::ProcessExternalHostMessage(const std::string& message, 1844 void TabContents::ProcessExternalHostMessage(const std::string& message,
1849 const std::string& origin, 1845 const std::string& origin,
1850 const std::string& target) { 1846 const std::string& target) {
1851 if (delegate()) 1847 if (delegate())
1852 delegate()->ForwardMessageToExternalHost(message, origin, target); 1848 delegate()->ForwardMessageToExternalHost(message, origin, target);
1853 } 1849 }
1854 1850
1855 void TabContents::GoToEntryAtOffset(int offset) { 1851 void TabContents::GoToEntryAtOffset(int offset) {
1856 controller_.GoToOffset(offset); 1852 controller_.GoToOffset(offset);
1857 } 1853 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 &GearsCreateShortcutCallbackFunctor::Run)); 2170 &GearsCreateShortcutCallbackFunctor::Run));
2175 } 2171 }
2176 2172
2177 void TabContents::OnUserGesture() { 2173 void TabContents::OnUserGesture() {
2178 // See comment in RenderViewHostDelegate::OnUserGesture as to why we do this. 2174 // See comment in RenderViewHostDelegate::OnUserGesture as to why we do this.
2179 #if defined(OS_WIN) || defined(OS_LINUX) 2175 #if defined(OS_WIN) || defined(OS_LINUX)
2180 DownloadRequestManager* drm = g_browser_process->download_request_manager(); 2176 DownloadRequestManager* drm = g_browser_process->download_request_manager();
2181 if (drm) 2177 if (drm)
2182 drm->OnUserGesture(this); 2178 drm->OnUserGesture(this);
2183 #endif 2179 #endif
2184 controller_.OnUserGesture();
2185 } 2180 }
2186 2181
2187 void TabContents::OnFindReply(int request_id, 2182 void TabContents::OnFindReply(int request_id,
2188 int number_of_matches, 2183 int number_of_matches,
2189 const gfx::Rect& selection_rect, 2184 const gfx::Rect& selection_rect,
2190 int active_match_ordinal, 2185 int active_match_ordinal,
2191 bool final_update) { 2186 bool final_update) {
2192 // Ignore responses for requests other than the one we have most recently 2187 // Ignore responses for requests other than the one we have most recently
2193 // issued. That way we won't act on stale results when the user has 2188 // issued. That way we won't act on stale results when the user has
2194 // already typed in another query. 2189 // already typed in another query.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 NavigationController::LoadCommittedDetails& committed_details = 2319 NavigationController::LoadCommittedDetails& committed_details =
2325 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2320 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2326 ExpireInfoBars(committed_details); 2321 ExpireInfoBars(committed_details);
2327 break; 2322 break;
2328 } 2323 }
2329 2324
2330 default: 2325 default:
2331 NOTREACHED(); 2326 NOTREACHED();
2332 } 2327 }
2333 } 2328 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698