2014-10-31 21:17:05 +03:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 13:49:37 +04:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-12 05:46:58 +04:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 04:58:59 +04:00
|
|
|
#ifndef ATOM_APP_ATOM_MAIN_DELEGATE_H_
|
|
|
|
#define ATOM_APP_ATOM_MAIN_DELEGATE_H_
|
2013-04-12 05:46:58 +04:00
|
|
|
|
|
|
|
#include "brightray/common/main_delegate.h"
|
2014-06-30 10:16:16 +04:00
|
|
|
#include "brightray/common/content_client.h"
|
2013-04-12 05:46:58 +04:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class AtomMainDelegate : public brightray::MainDelegate {
|
2013-04-12 19:16:16 +04:00
|
|
|
public:
|
2013-04-12 05:46:58 +04:00
|
|
|
AtomMainDelegate();
|
|
|
|
~AtomMainDelegate();
|
|
|
|
|
2013-04-20 10:03:55 +04:00
|
|
|
protected:
|
2014-07-16 11:05:02 +04:00
|
|
|
// content::ContentMainDelegate:
|
2014-11-21 11:40:47 +03:00
|
|
|
bool BasicStartupComplete(int* exit_code) override;
|
|
|
|
void PreSandboxStartup() override;
|
|
|
|
content::ContentBrowserClient* CreateContentBrowserClient() override;
|
|
|
|
content::ContentRendererClient* CreateContentRendererClient() override;
|
2013-09-12 13:51:45 +04:00
|
|
|
|
2014-08-27 16:48:49 +04:00
|
|
|
// brightray::MainDelegate:
|
2014-11-21 11:40:47 +03:00
|
|
|
scoped_ptr<brightray::ContentClient> CreateContentClient() override;
|
|
|
|
void AddDataPackFromPath(
|
|
|
|
ui::ResourceBundle* bundle, const base::FilePath& pak_dir) override;
|
2014-12-29 20:35:08 +03:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
void OverrideChildProcessPath() override;
|
|
|
|
void OverrideFrameworkBundlePath() override;
|
|
|
|
#endif
|
2013-04-20 07:19:25 +04:00
|
|
|
|
2013-04-12 19:16:16 +04:00
|
|
|
private:
|
2014-06-30 10:16:16 +04:00
|
|
|
brightray::ContentClient content_client_;
|
2013-04-12 05:46:58 +04:00
|
|
|
scoped_ptr<content::ContentBrowserClient> browser_client_;
|
|
|
|
scoped_ptr<content::ContentRendererClient> renderer_client_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2014-03-16 04:58:59 +04:00
|
|
|
#endif // ATOM_APP_ATOM_MAIN_DELEGATE_H_
|