| 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(UserMetricsAction("BookmarkAllTabs")); |
| 781 chrome::ShowBookmarkAllTabsDialog(browser); | 782 chrome::ShowBookmarkAllTabsDialog(browser); |
| 782 } | 783 } |
| 783 | 784 |
| 784 bool CanBookmarkAllTabs(const Browser* browser) { | 785 bool CanBookmarkAllTabs(const Browser* browser) { |
| 785 return browser->tab_strip_model()->count() > 1 && | 786 return browser->tab_strip_model()->count() > 1 && |
| 786 !chrome::ShouldRemoveBookmarkOpenPagesUI(browser->profile()) && | 787 !chrome::ShouldRemoveBookmarkOpenPagesUI(browser->profile()) && |
| 787 CanBookmarkCurrentPageInternal(browser, false); | 788 CanBookmarkCurrentPageInternal(browser, false); |
| 788 } | 789 } |
| 789 | 790 |
| 790 void Translate(Browser* browser) { | 791 void Translate(Browser* browser) { |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 browser->host_desktop_type())); | 1290 browser->host_desktop_type())); |
| 1290 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1291 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1291 | 1292 |
| 1292 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1293 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1293 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1294 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1294 app_browser->window()->Show(); | 1295 app_browser->window()->Show(); |
| 1295 } | 1296 } |
| 1296 #endif // defined(ENABLE_EXTENSIONS) | 1297 #endif // defined(ENABLE_EXTENSIONS) |
| 1297 | 1298 |
| 1298 } // namespace chrome | 1299 } // namespace chrome |
| OLD | NEW |