| OLD | NEW |
| 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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 if (!entry) | 1172 if (!entry) |
| 1173 return; | 1173 return; |
| 1174 if (entry->GetIsOverridingUserAgent()) { | 1174 if (entry->GetIsOverridingUserAgent()) { |
| 1175 entry->SetIsOverridingUserAgent(false); | 1175 entry->SetIsOverridingUserAgent(false); |
| 1176 } else { | 1176 } else { |
| 1177 entry->SetIsOverridingUserAgent(true); | 1177 entry->SetIsOverridingUserAgent(true); |
| 1178 std::string product = version_info::GetProductNameAndVersionForUserAgent(); | 1178 std::string product = version_info::GetProductNameAndVersionForUserAgent(); |
| 1179 current_tab->SetUserAgentOverride(content::BuildUserAgentFromOSAndProduct( | 1179 current_tab->SetUserAgentOverride(content::BuildUserAgentFromOSAndProduct( |
| 1180 kOsOverrideForTabletSite, product)); | 1180 kOsOverrideForTabletSite, product)); |
| 1181 } | 1181 } |
| 1182 controller.ReloadOriginalRequestURL(true); | 1182 controller.Reload(true, content::ReloadType::ORIGINAL_REQUEST_URL); |
| 1183 } | 1183 } |
| 1184 | 1184 |
| 1185 void ToggleFullscreenMode(Browser* browser) { | 1185 void ToggleFullscreenMode(Browser* browser) { |
| 1186 DCHECK(browser); | 1186 DCHECK(browser); |
| 1187 browser->exclusive_access_manager() | 1187 browser->exclusive_access_manager() |
| 1188 ->fullscreen_controller() | 1188 ->fullscreen_controller() |
| 1189 ->ToggleBrowserFullscreenMode(); | 1189 ->ToggleBrowserFullscreenMode(); |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 void ClearCache(Browser* browser) { | 1192 void ClearCache(Browser* browser) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |