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

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

Issue 2552663002: NavigationController: merge Reload*() to one Reload() with ReloadType (Closed)
Patch Set: [rebase] Created 4 years 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.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 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/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 new_tab->UserGestureDone(); 257 new_tab->UserGestureDone();
258 if (!new_tab->FocusLocationBarByDefault()) 258 if (!new_tab->FocusLocationBarByDefault())
259 new_tab->Focus(); 259 new_tab->Focus();
260 260
261 DevToolsWindow* devtools = 261 DevToolsWindow* devtools =
262 DevToolsWindow::GetInstanceForInspectedWebContents(new_tab); 262 DevToolsWindow::GetInstanceForInspectedWebContents(new_tab);
263 if (devtools && devtools->ReloadInspectedWebContents(bypass_cache)) 263 if (devtools && devtools->ReloadInspectedWebContents(bypass_cache))
264 return; 264 return;
265 265
266 if (bypass_cache) 266 if (bypass_cache)
267 new_tab->GetController().ReloadBypassingCache(true); 267 new_tab->GetController().Reload(true, content::ReloadType::BYPASSING_CACHE);
268 else 268 else
269 new_tab->GetController().Reload(true); 269 new_tab->GetController().Reload(true);
270 } 270 }
271 271
272 bool IsShowingWebContentsModalDialog(Browser* browser) { 272 bool IsShowingWebContentsModalDialog(Browser* browser) {
273 WebContents* web_contents = 273 WebContents* web_contents =
274 browser->tab_strip_model()->GetActiveWebContents(); 274 browser->tab_strip_model()->GetActiveWebContents();
275 if (!web_contents) 275 if (!web_contents)
276 return false; 276 return false;
277 277
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); 1330 app_name, true /* trusted_source */, gfx::Rect(), browser->profile()));
1331 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1331 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1332 1332
1333 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1333 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1334 contents->GetRenderViewHost()->SyncRendererPrefs(); 1334 contents->GetRenderViewHost()->SyncRendererPrefs();
1335 app_browser->window()->Show(); 1335 app_browser->window()->Show();
1336 } 1336 }
1337 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 1337 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
1338 1338
1339 } // namespace chrome 1339 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698