Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/mac/foundation_util.h" 13 #include "base/mac/foundation_util.h"
14 #include "base/mac/mac_util.h" 14 #include "base/mac/mac_util.h"
15 #include "base/mac/sdk_forward_declarations.h" 15 #include "base/mac/sdk_forward_declarations.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
18 #include "base/message_loop/message_loop.h" 18 #include "base/message_loop/message_loop.h"
19 #include "base/metrics/histogram_macros.h" 19 #include "base/metrics/histogram_macros.h"
20 #include "base/metrics/user_metrics.h"
20 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/sys_string_conversions.h" 22 #include "base/strings/sys_string_conversions.h"
22 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
23 #include "chrome/app/chrome_command_ids.h" 24 #include "chrome/app/chrome_command_ids.h"
24 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h" 25 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h"
25 #include "chrome/browser/apps/app_window_registry_util.h" 26 #include "chrome/browser/apps/app_window_registry_util.h"
26 #include "chrome/browser/background/background_application_list_model.h" 27 #include "chrome/browser/background/background_application_list_model.h"
27 #include "chrome/browser/background/background_mode_manager.h" 28 #include "chrome/browser/background/background_mode_manager.h"
28 #include "chrome/browser/browser_process.h" 29 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/browser_shutdown.h" 30 #include "chrome/browser/browser_shutdown.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #include "components/handoff/handoff_manager.h" 88 #include "components/handoff/handoff_manager.h"
88 #include "components/handoff/handoff_utility.h" 89 #include "components/handoff/handoff_utility.h"
89 #include "components/prefs/pref_service.h" 90 #include "components/prefs/pref_service.h"
90 #include "components/sessions/core/tab_restore_service.h" 91 #include "components/sessions/core/tab_restore_service.h"
91 #include "components/signin/core/browser/signin_manager.h" 92 #include "components/signin/core/browser/signin_manager.h"
92 #include "content/public/browser/browser_thread.h" 93 #include "content/public/browser/browser_thread.h"
93 #include "content/public/browser/download_manager.h" 94 #include "content/public/browser/download_manager.h"
94 #include "content/public/browser/notification_service.h" 95 #include "content/public/browser/notification_service.h"
95 #include "content/public/browser/notification_types.h" 96 #include "content/public/browser/notification_types.h"
96 #include "content/public/browser/plugin_service.h" 97 #include "content/public/browser/plugin_service.h"
97 #include "content/public/browser/user_metrics.h"
98 #include "extensions/browser/extension_registry.h" 98 #include "extensions/browser/extension_registry.h"
99 #include "extensions/browser/extension_system.h" 99 #include "extensions/browser/extension_system.h"
100 #include "net/base/filename_util.h" 100 #include "net/base/filename_util.h"
101 #include "ui/base/cocoa/focus_window_set.h" 101 #include "ui/base/cocoa/focus_window_set.h"
102 #include "ui/base/l10n/l10n_util.h" 102 #include "ui/base/l10n/l10n_util.h"
103 #include "ui/base/l10n/l10n_util_mac.h" 103 #include "ui/base/l10n/l10n_util_mac.h"
104 104
105 using apps::AppShimHandler; 105 using apps::AppShimHandler;
106 using apps::ExtensionAppShimHandler; 106 using apps::ExtensionAppShimHandler;
107 using base::UserMetricsAction; 107 using base::UserMetricsAction;
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 } 996 }
997 case IDC_IMPORT_SETTINGS: { 997 case IDC_IMPORT_SETTINGS: {
998 if (Browser* browser = ActivateBrowser(lastProfile)) { 998 if (Browser* browser = ActivateBrowser(lastProfile)) {
999 chrome::ShowImportDialog(browser); 999 chrome::ShowImportDialog(browser);
1000 } else { 1000 } else {
1001 chrome::OpenImportSettingsDialogWindow(lastProfile); 1001 chrome::OpenImportSettingsDialogWindow(lastProfile);
1002 } 1002 }
1003 break; 1003 break;
1004 } 1004 }
1005 case IDC_SHOW_BOOKMARK_MANAGER: 1005 case IDC_SHOW_BOOKMARK_MANAGER:
1006 content::RecordAction(UserMetricsAction("ShowBookmarkManager")); 1006 base::RecordAction(UserMetricsAction("ShowBookmarkManager"));
1007 if (Browser* browser = ActivateBrowser(lastProfile)) { 1007 if (Browser* browser = ActivateBrowser(lastProfile)) {
1008 chrome::ShowBookmarkManager(browser); 1008 chrome::ShowBookmarkManager(browser);
1009 } else { 1009 } else {
1010 // No browser window, so create one for the bookmark manager tab. 1010 // No browser window, so create one for the bookmark manager tab.
1011 chrome::OpenBookmarkManagerWindow(lastProfile); 1011 chrome::OpenBookmarkManagerWindow(lastProfile);
1012 } 1012 }
1013 break; 1013 break;
1014 case IDC_SHOW_HISTORY: 1014 case IDC_SHOW_HISTORY:
1015 if (Browser* browser = ActivateBrowser(lastProfile)) 1015 if (Browser* browser = ActivateBrowser(lastProfile))
1016 chrome::ShowHistory(browser); 1016 chrome::ShowHistory(browser);
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1602
1603 //--------------------------------------------------------------------------- 1603 //---------------------------------------------------------------------------
1604 1604
1605 namespace app_controller_mac { 1605 namespace app_controller_mac {
1606 1606
1607 bool IsOpeningNewWindow() { 1607 bool IsOpeningNewWindow() {
1608 return g_is_opening_new_window; 1608 return g_is_opening_new_window;
1609 } 1609 }
1610 1610
1611 } // namespace app_controller_mac 1611 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698