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

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

Issue 7582004: Add load flag indicating a request is probably the result of a user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to lkgr. Created 9 years, 4 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 | « content/browser/renderer_host/resource_dispatcher_host.cc ('k') | net/base/load_flags_list.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 return web_prefs; 1735 return web_prefs;
1736 } 1736 }
1737 1737
1738 void TabContents::OnUserGesture() { 1738 void TabContents::OnUserGesture() {
1739 // Notify observers. 1739 // Notify observers.
1740 FOR_EACH_OBSERVER(TabContentsObserver, observers_, DidGetUserGesture()); 1740 FOR_EACH_OBSERVER(TabContentsObserver, observers_, DidGetUserGesture());
1741 1741
1742 ResourceDispatcherHost* rdh = 1742 ResourceDispatcherHost* rdh =
1743 content::GetContentClient()->browser()->GetResourceDispatcherHost(); 1743 content::GetContentClient()->browser()->GetResourceDispatcherHost();
1744 if (rdh) // NULL in unittests. 1744 if (rdh) // NULL in unittests.
1745 rdh->download_request_limiter()->OnUserGesture(this); 1745 rdh->OnUserGesture(this);
1746 } 1746 }
1747 1747
1748 void TabContents::OnIgnoredUIEvent() { 1748 void TabContents::OnIgnoredUIEvent() {
1749 if (constrained_window_count()) { 1749 if (constrained_window_count()) {
1750 ConstrainedWindow* window = *constrained_window_begin(); 1750 ConstrainedWindow* window = *constrained_window_begin();
1751 window->FocusConstrainedWindow(); 1751 window->FocusConstrainedWindow();
1752 } 1752 }
1753 } 1753 }
1754 1754
1755 void TabContents::RendererUnresponsive(RenderViewHost* rvh, 1755 void TabContents::RendererUnresponsive(RenderViewHost* rvh,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 } 1912 }
1913 1913
1914 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1914 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1915 render_manager_.SwapInRenderViewHost(rvh); 1915 render_manager_.SwapInRenderViewHost(rvh);
1916 } 1916 }
1917 1917
1918 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1918 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1919 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1919 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1920 rwh_view->SetSize(view()->GetContainerSize()); 1920 rwh_view->SetSize(view()->GetContainerSize());
1921 } 1921 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host.cc ('k') | net/base/load_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698