electron/brightray/common/main_delegate.h

63 lines
1.6 KiB
C
Raw Normal View History

2013-03-13 19:12:05 +00:00
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BRIGHTRAY_COMMON_MAIN_DELEGATE_H_
#define BRIGHTRAY_COMMON_MAIN_DELEGATE_H_
2013-03-13 19:12:05 +00:00
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/app/content_main_delegate.h"
namespace base {
class FilePath;
}
2013-03-13 19:12:05 +00:00
namespace ui {
class ResourceBundle;
}
2013-03-13 19:12:05 +00:00
namespace brightray {
class BrowserClient;
class ContentClient;
void InitializeResourceBundle(const std::string& locale);
base::FilePath GetResourcesPakFilePath();
2013-03-13 19:12:05 +00:00
class MainDelegate : public content::ContentMainDelegate {
2013-11-17 23:57:54 +00:00
public:
2013-03-13 19:12:05 +00:00
MainDelegate();
~MainDelegate();
2013-11-17 23:57:54 +00:00
protected:
// Subclasses can override this to provide their own ContentClient
// implementation.
virtual scoped_ptr<ContentClient> CreateContentClient();
// Subclasses can override this to provide their own BrowserClient
// implementation.
virtual scoped_ptr<BrowserClient> CreateBrowserClient();
#if defined(OS_MACOSX)
// Subclasses can override this to custom the paths of child process and
// framework bundle.
virtual void OverrideChildProcessPath();
virtual void OverrideFrameworkBundlePath();
#endif
2015-06-05 04:07:27 +00:00
bool BasicStartupComplete(int* exit_code) override;
void PreSandboxStartup() override;
2013-11-17 23:57:54 +00:00
private:
2015-06-05 04:07:27 +00:00
content::ContentBrowserClient* CreateContentBrowserClient() override;
scoped_ptr<ContentClient> content_client_;
scoped_ptr<BrowserClient> browser_client_;
2013-03-13 19:12:05 +00:00
DISALLOW_COPY_AND_ASSIGN(MainDelegate);
};
} // namespace brightray
#endif