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

Side by Side Diff: chrome/common/platform_util_mac.mm

Issue 112064: Linux: call xdg-open on downloaded files to open them. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix typos Created 11 years, 7 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 | « chrome/common/platform_util_linux.cc ('k') | chrome/common/platform_util_win.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/common/platform_util.h" 5 #include "chrome/common/platform_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
13 #include "chrome/browser/cocoa/tab_window_controller.h" 13 #include "chrome/browser/cocoa/tab_window_controller.h"
14 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
15 15
16 namespace platform_util { 16 namespace platform_util {
17 17
18 void ShowItemInFolder(const FilePath& full_path) { 18 void ShowItemInFolder(const FilePath& full_path) {
19 NSString* path_string = base::SysUTF8ToNSString(full_path.value()); 19 NSString* path_string = base::SysUTF8ToNSString(full_path.value());
20 [[NSWorkspace sharedWorkspace] selectFile:path_string 20 [[NSWorkspace sharedWorkspace] selectFile:path_string
21 inFileViewerRootedAtPath:nil]; 21 inFileViewerRootedAtPath:nil];
22 } 22 }
23 23
24 void OpenItem(const FilePath& full_path) {
25 NOTIMPLEMENTED();
26 }
27
24 gfx::NativeWindow GetTopLevel(gfx::NativeView view) { 28 gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
25 return [view window]; 29 return [view window];
26 } 30 }
27 31
28 string16 GetWindowTitle(gfx::NativeWindow window) { 32 string16 GetWindowTitle(gfx::NativeWindow window) {
29 NSString* title = nil; 33 NSString* title = nil;
30 if ([[window delegate] isKindOfClass:[TabWindowController class]]) 34 if ([[window delegate] isKindOfClass:[TabWindowController class]])
31 title = [[window delegate] selectedTabTitle]; 35 title = [[window delegate] selectedTabTitle];
32 else 36 else
33 title = [window title]; 37 title = [window title];
34 // If we don't yet have a title, use "Untitled". 38 // If we don't yet have a title, use "Untitled".
35 if (![title length]) 39 if (![title length])
36 return WideToUTF16(l10n_util::GetString( 40 return WideToUTF16(l10n_util::GetString(
37 IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED)); 41 IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED));
38 42
39 return base::SysNSStringToUTF16(title); 43 return base::SysNSStringToUTF16(title);
40 } 44 }
41 45
42 bool IsWindowActive(gfx::NativeWindow window) { 46 bool IsWindowActive(gfx::NativeWindow window) {
43 NOTIMPLEMENTED(); 47 NOTIMPLEMENTED();
44 return false; 48 return false;
45 } 49 }
46 50
47 bool IsVisible(gfx::NativeView view) { 51 bool IsVisible(gfx::NativeView view) {
48 NOTIMPLEMENTED(); 52 NOTIMPLEMENTED();
49 return true; 53 return true;
50 } 54 }
51 55
52 } // namespace platform_util 56 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/common/platform_util_linux.cc ('k') | chrome/common/platform_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698