Chromium Code Reviews| 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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 771 #endif | 771 #endif |
| 772 | 772 |
| 773 BookmarkCurrentPageInternal(browser); | 773 BookmarkCurrentPageInternal(browser); |
| 774 } | 774 } |
| 775 | 775 |
| 776 bool CanBookmarkCurrentPage(const Browser* browser) { | 776 bool CanBookmarkCurrentPage(const Browser* browser) { |
| 777 return CanBookmarkCurrentPageInternal(browser, true); | 777 return CanBookmarkCurrentPageInternal(browser, true); |
| 778 } | 778 } |
| 779 | 779 |
| 780 void BookmarkAllTabs(Browser* browser) { | 780 void BookmarkAllTabs(Browser* browser) { |
| 781 content::RecordAction( | |
| 782 UserMetricsAction("BookmarkAllTabs")); | |
|
Mark P
2014/11/25 04:56:21
nit: fits on one line
Mike Wittman
2014/12/03 20:22:38
Done.
| |
| 781 chrome::ShowBookmarkAllTabsDialog(browser); | 783 chrome::ShowBookmarkAllTabsDialog(browser); |
| 782 } | 784 } |
| 783 | 785 |
| 784 bool CanBookmarkAllTabs(const Browser* browser) { | 786 bool CanBookmarkAllTabs(const Browser* browser) { |
| 785 return browser->tab_strip_model()->count() > 1 && | 787 return browser->tab_strip_model()->count() > 1 && |
| 786 !chrome::ShouldRemoveBookmarkOpenPagesUI(browser->profile()) && | 788 !chrome::ShouldRemoveBookmarkOpenPagesUI(browser->profile()) && |
| 787 CanBookmarkCurrentPageInternal(browser, false); | 789 CanBookmarkCurrentPageInternal(browser, false); |
| 788 } | 790 } |
| 789 | 791 |
| 790 void Translate(Browser* browser) { | 792 void Translate(Browser* browser) { |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1289 browser->host_desktop_type())); | 1291 browser->host_desktop_type())); |
| 1290 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1292 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1291 | 1293 |
| 1292 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1294 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1293 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1295 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1294 app_browser->window()->Show(); | 1296 app_browser->window()->Show(); |
| 1295 } | 1297 } |
| 1296 #endif // defined(ENABLE_EXTENSIONS) | 1298 #endif // defined(ENABLE_EXTENSIONS) |
| 1297 | 1299 |
| 1298 } // namespace chrome | 1300 } // namespace chrome |
| OLD | NEW |