'atom/renderer/api/lib/web-view.coffee',
],
'lib_sources': [
+ 'atom/app/atom_content_client.cc',
+ 'atom/app/atom_content_client.h',
'atom/app/atom_main_delegate.cc',
'atom/app/atom_main_delegate.h',
'atom/app/atom_main_delegate_mac.mm',
--- /dev/null
+// Copyright (c) 2014 GitHub, Inc. All rights reserved.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#include "atom/app/atom_content_client.h"
+
+namespace atom {
+
+AtomContentClient::AtomContentClient() {
+}
+
+AtomContentClient::~AtomContentClient() {
+}
+
+void AtomContentClient::AddAdditionalSchemes(
+ std::vector<std::string>* standard_schemes,
+ std::vector<std::string>* savable_schemes) {
+ standard_schemes->push_back("chrome-extension");
+}
+
+} // namespace atom
--- /dev/null
+// Copyright (c) 2014 GitHub, Inc. All rights reserved.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#ifndef ATOM_APP_ATOM_CONTENT_CLIENT_H_
+#define ATOM_APP_ATOM_CONTENT_CLIENT_H_
+
+#include "brightray/common/content_client.h"
+
+namespace atom {
+
+class AtomContentClient : public brightray::ContentClient {
+ public:
+ AtomContentClient();
+ virtual ~AtomContentClient();
+
+ protected:
+ // content::ContentClient:
+ virtual void AddAdditionalSchemes(
+ std::vector<std::string>* standard_schemes,
+ std::vector<std::string>* savable_schemes) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
+};
+
+} // namespace atom
+
+#endif // ATOM_APP_ATOM_CONTENT_CLIENT_H_
#include <string>
+#include "atom/app/atom_content_client.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/renderer/atom_renderer_client.h"
#include "base/command_line.h"
AtomMainDelegate::~AtomMainDelegate() {
}
-void AtomMainDelegate::AddDataPackFromPath(
- ui::ResourceBundle* bundle, const base::FilePath& pak_dir) {
-#if defined(OS_WIN)
- bundle->AddDataPackFromPath(
- pak_dir.Append(FILE_PATH_LITERAL("ui_resources_200_percent.pak")),
- ui::SCALE_FACTOR_200P);
- bundle->AddDataPackFromPath(
- pak_dir.Append(FILE_PATH_LITERAL("webkit_resources_200_percent.pak")),
- ui::SCALE_FACTOR_200P);
-#endif
-}
-
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
// Disable logging out to debug.log on Windows
#if defined(OS_WIN)
return renderer_client_.get();
}
+scoped_ptr<brightray::ContentClient> AtomMainDelegate::CreateContentClient() {
+ return scoped_ptr<brightray::ContentClient>(new AtomContentClient).Pass();
+}
+
+void AtomMainDelegate::AddDataPackFromPath(
+ ui::ResourceBundle* bundle, const base::FilePath& pak_dir) {
+#if defined(OS_WIN)
+ bundle->AddDataPackFromPath(
+ pak_dir.Append(FILE_PATH_LITERAL("ui_resources_200_percent.pak")),
+ ui::SCALE_FACTOR_200P);
+ bundle->AddDataPackFromPath(
+ pak_dir.Append(FILE_PATH_LITERAL("webkit_resources_200_percent.pak")),
+ ui::SCALE_FACTOR_200P);
+#endif
+}
+
} // namespace atom
~AtomMainDelegate();
protected:
- // brightray::MainDelegate:
- virtual void AddDataPackFromPath(
- ui::ResourceBundle* bundle, const base::FilePath& pak_dir) OVERRIDE;
-
// content::ContentMainDelegate:
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
virtual void PreSandboxStartup() OVERRIDE;
+ virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
+ virtual content::ContentRendererClient*
+ CreateContentRendererClient() OVERRIDE;
+ // brightray::MainDelegate:
+ virtual scoped_ptr<brightray::ContentClient> CreateContentClient() OVERRIDE;
+ virtual void AddDataPackFromPath(
+ ui::ResourceBundle* bundle, const base::FilePath& pak_dir) OVERRIDE;
#if defined(OS_MACOSX)
virtual void OverrideChildProcessPath() OVERRIDE;
virtual void OverrideFrameworkBundlePath() OVERRIDE;
#endif
private:
- virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
- virtual content::ContentRendererClient*
- CreateContentRendererClient() OVERRIDE;
-
brightray::ContentClient content_client_;
scoped_ptr<content::ContentBrowserClient> browser_client_;
scoped_ptr<content::ContentRendererClient> renderer_client_;