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

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

Issue 10407122: Get rid of the last RenderViewHostDelegate usage in chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/task_manager/task_manager.cc ('k') | chrome/browser/ui/browser_navigator.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 (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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 5043 matching lines...) Expand 10 before | Expand all | Expand 10 after
5054 entry->GetURL(), Referrer(), disposition, 5054 entry->GetURL(), Referrer(), disposition,
5055 content::PAGE_TRANSITION_RELOAD, false)); 5055 content::PAGE_TRANSITION_RELOAD, false));
5056 return; 5056 return;
5057 } 5057 }
5058 5058
5059 // As this is caused by a user action, give the focus to the page. 5059 // As this is caused by a user action, give the focus to the page.
5060 // 5060 //
5061 // Also notify RenderViewHostDelegate of the user gesture; this is 5061 // Also notify RenderViewHostDelegate of the user gesture; this is
5062 // normally done in Browser::Navigate, but a reload bypasses Navigate. 5062 // normally done in Browser::Navigate, but a reload bypasses Navigate.
5063 WebContents* tab = GetOrCloneTabForDisposition(disposition); 5063 WebContents* tab = GetOrCloneTabForDisposition(disposition);
5064 tab->GetRenderViewHost()->GetDelegate()->OnUserGesture(); 5064 tab->UserGestureDone();
5065 if (!tab->FocusLocationBarByDefault()) 5065 if (!tab->FocusLocationBarByDefault())
5066 tab->Focus(); 5066 tab->Focus();
5067 if (ignore_cache) 5067 if (ignore_cache)
5068 tab->GetController().ReloadIgnoringCache(true); 5068 tab->GetController().ReloadIgnoringCache(true);
5069 else 5069 else
5070 tab->GetController().Reload(true); 5070 tab->GetController().Reload(true);
5071 } 5071 }
5072 5072
5073 WebContents* Browser::GetOrCloneTabForDisposition( 5073 WebContents* Browser::GetOrCloneTabForDisposition(
5074 WindowOpenDisposition disposition) { 5074 WindowOpenDisposition disposition) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
5395 if (contents && !allow_js_access) { 5395 if (contents && !allow_js_access) {
5396 contents->web_contents()->GetController().LoadURL( 5396 contents->web_contents()->GetController().LoadURL(
5397 target_url, 5397 target_url,
5398 content::Referrer(), 5398 content::Referrer(),
5399 content::PAGE_TRANSITION_LINK, 5399 content::PAGE_TRANSITION_LINK,
5400 std::string()); // No extra headers. 5400 std::string()); // No extra headers.
5401 } 5401 }
5402 5402
5403 return contents != NULL; 5403 return contents != NULL;
5404 } 5404 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698