OLD | NEW |
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_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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_editor.h" | 10 #include "chrome/browser/bookmarks/bookmark_editor.h" |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 | 866 |
867 void ToggleSpeechInput(Browser* browser) { | 867 void ToggleSpeechInput(Browser* browser) { |
868 GetActiveWebContents(browser)->GetRenderViewHost()->ToggleSpeechInput(); | 868 GetActiveWebContents(browser)->GetRenderViewHost()->ToggleSpeechInput(); |
869 } | 869 } |
870 | 870 |
871 void ToggleFullscreenMode(Browser* browser) { | 871 void ToggleFullscreenMode(Browser* browser) { |
872 browser->fullscreen_controller()->ToggleFullscreenMode(); | 872 browser->fullscreen_controller()->ToggleFullscreenMode(); |
873 } | 873 } |
874 | 874 |
875 void ClearCache(Browser* browser) { | 875 void ClearCache(Browser* browser) { |
876 BrowsingDataRemover* remover = new BrowsingDataRemover(browser->profile(), | 876 BrowsingDataRemover* remover = |
877 BrowsingDataRemover::EVERYTHING, | 877 BrowsingDataRemover::CreateForUnboundedRange(browser->profile()); |
878 base::Time::Now()); | |
879 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, | 878 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, |
880 BrowsingDataHelper::UNPROTECTED_WEB); | 879 BrowsingDataHelper::UNPROTECTED_WEB); |
881 // BrowsingDataRemover takes care of deleting itself when done. | 880 // BrowsingDataRemover takes care of deleting itself when done. |
882 } | 881 } |
883 | 882 |
884 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { | 883 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { |
885 WebContents* contents = chrome::GetActiveWebContents(browser); | 884 WebContents* contents = chrome::GetActiveWebContents(browser); |
886 return contents ? | 885 return contents ? |
887 content::DevToolsAgentHostRegistry::IsDebuggerAttached(contents) : false; | 886 content::DevToolsAgentHostRegistry::IsDebuggerAttached(contents) : false; |
888 } | 887 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 BrowserCommandsTabContentsCreator::CreateTabContents(contents); | 998 BrowserCommandsTabContentsCreator::CreateTabContents(contents); |
1000 } | 999 } |
1001 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); | 1000 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); |
1002 | 1001 |
1003 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1002 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1004 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1003 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1005 app_browser->window()->Show(); | 1004 app_browser->window()->Show(); |
1006 } | 1005 } |
1007 | 1006 |
1008 } // namespace chrome | 1007 } // namespace chrome |
OLD | NEW |