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

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

Issue 3158026: Add support for receiving text from system services on Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_mac.h" 8 #include "app/l10n_util_mac.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 menuState_->UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); 875 menuState_->UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
876 menuState_->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, true); 876 menuState_->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, true);
877 menuState_->UpdateCommandEnabled(IDC_HELP_PAGE, true); 877 menuState_->UpdateCommandEnabled(IDC_HELP_PAGE, true);
878 menuState_->UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); 878 menuState_->UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true);
879 menuState_->UpdateCommandEnabled(IDC_REPORT_BUG, true); 879 menuState_->UpdateCommandEnabled(IDC_REPORT_BUG, true);
880 menuState_->UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, true); 880 menuState_->UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, true);
881 menuState_->UpdateCommandEnabled(IDC_TASK_MANAGER, true); 881 menuState_->UpdateCommandEnabled(IDC_TASK_MANAGER, true);
882 } 882 }
883 883
884 - (void)registerServicesMenuTypesTo:(NSApplication*)app { 884 - (void)registerServicesMenuTypesTo:(NSApplication*)app {
885 // Currently we only support one-way service requests and don't 885 // Note that RenderWidgetHostViewCocoa implements NSServicesRequests which
886 // support services that have return values such as the PGP 886 // handles requests from services.
887 // encryption service. 887 NSArray* types = [NSArray arrayWithObjects:NSStringPboardType, nil];
888 // Also note that RenderWidgetHostViewCocoa implements 888 [app registerServicesMenuSendTypes:types returnTypes:types];
889 // NSServicesRequests which handles requests from services.
890 NSArray* sendTypes = [NSArray arrayWithObjects:NSStringPboardType, nil];
891 NSArray* returnTypes = [NSArray array];
892 [app registerServicesMenuSendTypes:sendTypes returnTypes:returnTypes];
893 } 889 }
894 890
895 - (Profile*)defaultProfile { 891 - (Profile*)defaultProfile {
896 // TODO(jrg): Find a better way to get the "default" profile. 892 // TODO(jrg): Find a better way to get the "default" profile.
897 if (g_browser_process->profile_manager()) 893 if (g_browser_process->profile_manager())
898 return *g_browser_process->profile_manager()->begin(); 894 return *g_browser_process->profile_manager()->begin();
899 895
900 return NULL; 896 return NULL;
901 } 897 }
902 898
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 [appController showPreferencesWindow:nil page:page profile:profile]; 1079 [appController showPreferencesWindow:nil page:page profile:profile];
1084 } 1080 }
1085 1081
1086 namespace app_controller_mac { 1082 namespace app_controller_mac {
1087 1083
1088 bool IsOpeningNewWindow() { 1084 bool IsOpeningNewWindow() {
1089 return g_is_opening_new_window; 1085 return g_is_opening_new_window;
1090 } 1086 }
1091 1087
1092 } // namespace app_controller_mac 1088 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698