.SetMethod("getName", base::Bind(&Browser::GetName, browser))
.SetMethod("setName", base::Bind(&Browser::SetName, browser))
.SetMethod("isReady", base::Bind(&Browser::is_ready, browser))
+ .SetMethod("addRecentDocument",
+ base::Bind(&Browser::AddRecentDocument, browser))
.SetMethod("getDataPath", &App::GetDataPath)
.SetMethod("resolveProxy", &App::ResolveProxy)
.SetMethod("setDesktopName", &App::SetDesktopName);
#include "atom/browser/browser_observer.h"
#include "atom/browser/window_list_observer.h"
+namespace base {
+class FilePath;
+}
+
namespace ui {
class MenuModel;
}
// Overrides the application name.
void SetName(const std::string& name);
+ // Add the |path| to recent documents list.
+ void AddRecentDocument(const base::FilePath& path);
+
#if defined(OS_MACOSX)
// Bounce the dock icon.
enum BounceType {
}
}
+void Browser::AddRecentDocument(const base::FilePath& path) {
+}
+
std::string Browser::GetExecutableFileVersion() const {
return ATOM_VERSION_STRING;
}
#include "atom/browser/native_window.h"
#include "atom/browser/window_list.h"
#import "base/mac/bundle_locations.h"
+#import "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
namespace atom {
[[AtomApplication sharedApplication] activateIgnoringOtherApps:YES];
}
+void Browser::AddRecentDocument(const base::FilePath& path) {
+ NSURL* u = [NSURL fileURLWithPath:base::mac::FilePathToNSString(path)];
+ [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:u];
+}
+
std::string Browser::GetExecutableFileVersion() const {
NSDictionary* infoDictionary = base::mac::OuterBundle().infoDictionary;
NSString *version = [infoDictionary objectForKey:@"CFBundleVersion"];
EnumWindows(&WindowsEnumerationHandler, reinterpret_cast<LPARAM>(&pid));
}
+void Browser::AddRecentDocument(const base::FilePath& path) {
+}
+
std::string Browser::GetExecutableFileVersion() const {
base::FilePath path;
if (PathService::Get(base::FILE_EXE, &path)) {