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/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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 void ToggleFullscreenMode(Browser* browser) { | 1146 void ToggleFullscreenMode(Browser* browser) { |
1147 DCHECK(browser); | 1147 DCHECK(browser); |
1148 browser->exclusive_access_manager() | 1148 browser->exclusive_access_manager() |
1149 ->fullscreen_controller() | 1149 ->fullscreen_controller() |
1150 ->ToggleBrowserFullscreenMode(); | 1150 ->ToggleBrowserFullscreenMode(); |
1151 } | 1151 } |
1152 | 1152 |
1153 void ClearCache(Browser* browser) { | 1153 void ClearCache(Browser* browser) { |
1154 BrowsingDataRemover* remover = | 1154 BrowsingDataRemover* remover = |
1155 BrowsingDataRemoverFactory::GetForBrowserContext(browser->profile()); | 1155 BrowsingDataRemoverFactory::GetForBrowserContext(browser->profile()); |
1156 remover->Remove(BrowsingDataRemover::Unbounded(), | 1156 remover->Remove(Unbounded(), BrowsingDataRemover::REMOVE_CACHE, |
1157 BrowsingDataRemover::REMOVE_CACHE, | |
1158 BrowsingDataHelper::UNPROTECTED_WEB); | 1157 BrowsingDataHelper::UNPROTECTED_WEB); |
1159 // BrowsingDataRemover takes care of deleting itself when done. | 1158 // BrowsingDataRemover takes care of deleting itself when done. |
1160 } | 1159 } |
1161 | 1160 |
1162 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { | 1161 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { |
1163 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); | 1162 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); |
1164 return contents ? | 1163 return contents ? |
1165 content::DevToolsAgentHost::IsDebuggerAttached(contents) : false; | 1164 content::DevToolsAgentHost::IsDebuggerAttached(contents) : false; |
1166 } | 1165 } |
1167 | 1166 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); | 1288 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); |
1290 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1289 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1291 | 1290 |
1292 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1291 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1293 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1292 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1294 app_browser->window()->Show(); | 1293 app_browser->window()->Show(); |
1295 } | 1294 } |
1296 #endif // defined(ENABLE_EXTENSIONS) | 1295 #endif // defined(ENABLE_EXTENSIONS) |
1297 | 1296 |
1298 } // namespace chrome | 1297 } // namespace chrome |
OLD | NEW |