electron/brightray/common/main_delegate.h
Adam Roben 12d01e4fd5 ifdef out a bunch of Mac-specific code
This is a hacky solution but helps us deal with other compiler/linker errors.
2013-05-22 13:55:56 -04:00

49 lines
1.3 KiB
C++

// 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_
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/app/content_main_delegate.h"
#include <vector>
namespace base {
class FilePath;
}
namespace brightray {
class ContentClient;
class MainDelegate : public content::ContentMainDelegate {
public:
MainDelegate();
~MainDelegate();
protected:
// Subclasses can override this to provide their own ContentClient implementation.
virtual scoped_ptr<ContentClient> CreateContentClient();
// 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) {}
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
virtual void PreSandboxStartup() OVERRIDE;
private:
#if defined(OS_MACOSX)
void InitializeResourceBundle();
static void OverrideChildProcessPath();
static void OverrideFrameworkBundlePath();
#endif
scoped_ptr<ContentClient> content_client_;
DISALLOW_COPY_AND_ASSIGN(MainDelegate);
};
}
#endif