2013-03-13 15:12:05 -04: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.
|
|
|
|
|
2013-03-13 15:42:16 -04:00
|
|
|
#ifndef BRIGHTRAY_COMMON_MAIN_DELEGATE_H_
|
|
|
|
#define BRIGHTRAY_COMMON_MAIN_DELEGATE_H_
|
2013-03-13 15:12:05 -04:00
|
|
|
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
#include "base/memory/scoped_ptr.h"
|
|
|
|
#include "content/public/app/content_main_delegate.h"
|
2013-04-26 11:04:51 -04:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace base {
|
|
|
|
class FilePath;
|
|
|
|
}
|
2013-03-13 15:12:05 -04:00
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
2013-03-14 09:03:50 -04:00
|
|
|
class ContentClient;
|
|
|
|
|
2013-03-13 15:12:05 -04:00
|
|
|
class MainDelegate : public content::ContentMainDelegate {
|
|
|
|
public:
|
|
|
|
MainDelegate();
|
|
|
|
~MainDelegate();
|
|
|
|
|
2013-03-28 12:34:49 -04:00
|
|
|
protected:
|
2013-04-24 18:30:47 -04:00
|
|
|
// Subclasses can override this to provide their own ContentClient implementation.
|
|
|
|
virtual scoped_ptr<ContentClient> CreateContentClient();
|
|
|
|
|
2013-04-26 11:04:51 -04:00
|
|
|
// Subclasses can override this to provide additional .pak files to be included in the ui::ResourceBundle.
|
|
|
|
virtual void AddPakPaths(std::vector<base::FilePath>* pak_paths) {}
|
|
|
|
|
2013-03-28 12:34:49 -04:00
|
|
|
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
|
|
|
|
virtual void PreSandboxStartup() OVERRIDE;
|
|
|
|
|
2013-03-13 15:12:05 -04:00
|
|
|
private:
|
2013-05-21 11:39:25 -04:00
|
|
|
void InitializeResourceBundle();
|
2013-05-22 11:40:43 -04:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
static base::FilePath GetResourcesPakFilePath();
|
2013-03-13 15:12:05 -04:00
|
|
|
static void OverrideChildProcessPath();
|
|
|
|
static void OverrideFrameworkBundlePath();
|
2013-07-17 11:04:45 -04:00
|
|
|
static void SetProcessName();
|
2013-03-13 15:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
2013-03-14 09:03:50 -04:00
|
|
|
scoped_ptr<ContentClient> content_client_;
|
|
|
|
|
2013-03-13 15:12:05 -04:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(MainDelegate);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2013-03-13 15:42:16 -04:00
|
|
|
#endif
|