2013-04-12 01:46:58 +00:00
|
|
|
// 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_BROWSER_ATOM_BROWSER_MAIN_PARTS_
|
|
|
|
#define ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_
|
|
|
|
|
|
|
|
#include "brightray/browser/browser_main_parts.h"
|
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2013-04-21 06:53:26 +00:00
|
|
|
class AtomBrowserBindings;
|
2013-05-02 15:43:23 +00:00
|
|
|
class Browser;
|
2013-04-13 10:39:09 +00:00
|
|
|
class NodeBindings;
|
|
|
|
|
2013-04-12 01:46:58 +00:00
|
|
|
class AtomBrowserMainParts : public brightray::BrowserMainParts {
|
2013-04-12 15:16:16 +00:00
|
|
|
public:
|
2013-04-12 01:46:58 +00:00
|
|
|
AtomBrowserMainParts();
|
2013-04-12 15:16:16 +00:00
|
|
|
virtual ~AtomBrowserMainParts();
|
2013-04-12 01:46:58 +00:00
|
|
|
|
2013-04-22 13:32:48 +00:00
|
|
|
static AtomBrowserMainParts* Get();
|
|
|
|
|
|
|
|
AtomBrowserBindings* atom_bindings() { return atom_bindings_.get(); }
|
2013-05-02 15:43:23 +00:00
|
|
|
Browser* browser() { return browser_.get(); }
|
2013-04-22 13:32:48 +00:00
|
|
|
|
2013-04-12 15:16:16 +00:00
|
|
|
protected:
|
2013-04-15 16:25:08 +00:00
|
|
|
// Implementations of brightray::BrowserMainParts.
|
|
|
|
virtual brightray::BrowserContext* CreateBrowserContext() OVERRIDE;
|
|
|
|
|
|
|
|
// Implementations of content::BrowserMainParts.
|
2013-04-13 10:39:09 +00:00
|
|
|
virtual void PostEarlyInitialization() OVERRIDE;
|
2013-04-12 01:46:58 +00:00
|
|
|
virtual void PreMainMessageLoopRun() OVERRIDE;
|
2013-09-29 07:06:29 +00:00
|
|
|
virtual int PreCreateThreads() OVERRIDE;
|
2013-07-04 12:09:11 +00:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
virtual void PreMainMessageLoopStart() OVERRIDE;
|
2013-05-30 08:03:10 +00:00
|
|
|
virtual void PostDestroyThreads() OVERRIDE;
|
2013-07-04 12:09:11 +00:00
|
|
|
#endif
|
2013-04-12 01:46:58 +00:00
|
|
|
|
2013-04-13 10:39:09 +00:00
|
|
|
private:
|
2013-04-21 06:53:26 +00:00
|
|
|
scoped_ptr<AtomBrowserBindings> atom_bindings_;
|
2013-05-02 15:43:23 +00:00
|
|
|
scoped_ptr<Browser> browser_;
|
2013-04-13 10:39:09 +00:00
|
|
|
scoped_ptr<NodeBindings> node_bindings_;
|
|
|
|
|
2013-04-22 13:32:48 +00:00
|
|
|
static AtomBrowserMainParts* self_;
|
|
|
|
|
2013-04-12 01:46:58 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(AtomBrowserMainParts);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_
|