electron/atom/app/atom_main_delegate.h

46 lines
1.4 KiB
C
Raw Normal View History

2013-04-12 09:46:58 +08:00
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
2014-04-25 17:49:37 +08:00
// Use of this source code is governed by the MIT license that can be
2013-04-12 09:46:58 +08:00
// found in the LICENSE file.
2014-03-16 08:58:59 +08:00
#ifndef ATOM_APP_ATOM_MAIN_DELEGATE_H_
#define ATOM_APP_ATOM_MAIN_DELEGATE_H_
2013-04-12 09:46:58 +08:00
#include "brightray/common/main_delegate.h"
#include "brightray/common/content_client.h"
2013-04-12 09:46:58 +08:00
namespace atom {
class AtomMainDelegate : public brightray::MainDelegate {
2013-04-12 23:16:16 +08:00
public:
2013-04-12 09:46:58 +08:00
AtomMainDelegate();
~AtomMainDelegate();
2013-04-20 14:03:55 +08:00
protected:
2014-07-16 15:05:02 +08:00
// content::ContentMainDelegate:
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
2013-04-20 11:19:25 +08:00
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)
2014-07-09 17:15:28 +08:00
virtual void OverrideChildProcessPath() OVERRIDE;
virtual void OverrideFrameworkBundlePath() OVERRIDE;
#endif
2013-04-20 11:19:25 +08:00
2013-04-12 23:16:16 +08:00
private:
brightray::ContentClient content_client_;
2013-04-12 09:46:58 +08:00
scoped_ptr<content::ContentBrowserClient> browser_client_;
scoped_ptr<content::ContentRendererClient> renderer_client_;
DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate);
};
} // namespace atom
2014-03-16 08:58:59 +08:00
#endif // ATOM_APP_ATOM_MAIN_DELEGATE_H_