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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 GetActiveWebContents(browser)->GetRenderViewHost()->ToggleSpeechInput(); | 864 GetActiveWebContents(browser)->GetRenderViewHost()->ToggleSpeechInput(); |
865 } | 865 } |
866 | 866 |
867 void ToggleFullscreenMode(Browser* browser) { | 867 void ToggleFullscreenMode(Browser* browser) { |
868 browser->fullscreen_controller()->ToggleFullscreenMode(); | 868 browser->fullscreen_controller()->ToggleFullscreenMode(); |
869 } | 869 } |
870 | 870 |
871 void ClearCache(Browser* browser) { | 871 void ClearCache(Browser* browser) { |
872 BrowsingDataRemover* remover = new BrowsingDataRemover(browser->profile(), | 872 BrowsingDataRemover* remover = new BrowsingDataRemover(browser->profile(), |
873 BrowsingDataRemover::EVERYTHING, | 873 BrowsingDataRemover::EVERYTHING, |
874 base::Time()); | 874 base::Time::Now()); |
875 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, | 875 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, |
876 BrowsingDataHelper::UNPROTECTED_WEB); | 876 BrowsingDataHelper::UNPROTECTED_WEB); |
877 // BrowsingDataRemover takes care of deleting itself when done. | 877 // BrowsingDataRemover takes care of deleting itself when done. |
878 } | 878 } |
879 | 879 |
880 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { | 880 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { |
881 WebContents* contents = chrome::GetActiveWebContents(browser); | 881 WebContents* contents = chrome::GetActiveWebContents(browser); |
882 return contents ? | 882 return contents ? |
883 content::DevToolsAgentHostRegistry::IsDebuggerAttached(contents) : false; | 883 content::DevToolsAgentHostRegistry::IsDebuggerAttached(contents) : false; |
884 } | 884 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 if (!tab_contents) | 989 if (!tab_contents) |
990 tab_contents = new TabContents(contents); | 990 tab_contents = new TabContents(contents); |
991 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); | 991 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); |
992 | 992 |
993 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 993 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
994 contents->GetRenderViewHost()->SyncRendererPrefs(); | 994 contents->GetRenderViewHost()->SyncRendererPrefs(); |
995 app_browser->window()->Show(); | 995 app_browser->window()->Show(); |
996 } | 996 } |
997 | 997 |
998 } // namespace chrome | 998 } // namespace chrome |
OLD | NEW |