Add platform_util from Chrome.
The platform_util files just come from chrome/browser/ with slight modifications so it doesn't depend on grit/generate_resources.h, which is not availabe in libchromiumcontent because it's generated by chrome's chrome/app/generated_resources.grd.
This commit is contained in:
parent
c5ef255c4b
commit
fbad5bc822
3 changed files with 161 additions and 0 deletions
30
common/platform_util.h
Normal file
30
common/platform_util.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_COMMON_PLATFORM_UTIL_H_
|
||||
#define ATOM_COMMON_PLATFORM_UTIL_H_
|
||||
|
||||
class GURL;
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
namespace platform_util {
|
||||
|
||||
// Show the given file in a file manager. If possible, select the file.
|
||||
// Must be called from the UI thread.
|
||||
void ShowItemInFolder(const base::FilePath& full_path);
|
||||
|
||||
// Open the given file in the desktop's default manner.
|
||||
// Must be called from the UI thread.
|
||||
void OpenItem(const base::FilePath& full_path);
|
||||
|
||||
// Open the given external protocol URL in the desktop's default manner.
|
||||
// (For example, mailto: URLs in the default mail user agent.)
|
||||
void OpenExternal(const GURL& url);
|
||||
|
||||
} // platform_util
|
||||
|
||||
#endif // ATOM_COMMON_PLATFORM_UTIL_H_
|
Loading…
Add table
Add a link
Reference in a new issue