| 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.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 chrome::VersionInfo version_info; | 1123 chrome::VersionInfo version_info; |
| 1124 std::string product = version_info.ProductNameAndVersionForUserAgent(); | 1124 std::string product = version_info.ProductNameAndVersionForUserAgent(); |
| 1125 current_tab->SetUserAgentOverride(content::BuildUserAgentFromOSAndProduct( | 1125 current_tab->SetUserAgentOverride(content::BuildUserAgentFromOSAndProduct( |
| 1126 kOsOverrideForTabletSite, product)); | 1126 kOsOverrideForTabletSite, product)); |
| 1127 } | 1127 } |
| 1128 controller.ReloadOriginalRequestURL(true); | 1128 controller.ReloadOriginalRequestURL(true); |
| 1129 } | 1129 } |
| 1130 | 1130 |
| 1131 void ToggleFullscreenMode(Browser* browser) { | 1131 void ToggleFullscreenMode(Browser* browser) { |
| 1132 DCHECK(browser); | 1132 DCHECK(browser); |
| 1133 browser->fullscreen_controller()->ToggleBrowserFullscreenMode(); | 1133 browser->exclusive_access_manager() |
| 1134 ->fullscreen_controller() |
| 1135 ->ToggleBrowserFullscreenMode(); |
| 1134 } | 1136 } |
| 1135 | 1137 |
| 1136 void ClearCache(Browser* browser) { | 1138 void ClearCache(Browser* browser) { |
| 1137 BrowsingDataRemover* remover = | 1139 BrowsingDataRemover* remover = |
| 1138 BrowsingDataRemover::CreateForUnboundedRange(browser->profile()); | 1140 BrowsingDataRemover::CreateForUnboundedRange(browser->profile()); |
| 1139 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, | 1141 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, |
| 1140 BrowsingDataHelper::UNPROTECTED_WEB); | 1142 BrowsingDataHelper::UNPROTECTED_WEB); |
| 1141 // BrowsingDataRemover takes care of deleting itself when done. | 1143 // BrowsingDataRemover takes care of deleting itself when done. |
| 1142 } | 1144 } |
| 1143 | 1145 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 browser->host_desktop_type())); | 1278 browser->host_desktop_type())); |
| 1277 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1279 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1278 | 1280 |
| 1279 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1281 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1280 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1282 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1281 app_browser->window()->Show(); | 1283 app_browser->window()->Show(); |
| 1282 } | 1284 } |
| 1283 #endif // defined(ENABLE_EXTENSIONS) | 1285 #endif // defined(ENABLE_EXTENSIONS) |
| 1284 | 1286 |
| 1285 } // namespace chrome | 1287 } // namespace chrome |
| OLD | NEW |