2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2011 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 file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_BROWSER_MAIN_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_BROWSER_MAIN_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "base/basictypes.h"
|
|
|
|
#include "base/memory/scoped_ptr.h"
|
|
|
|
#include "base/string_piece.h"
|
|
|
|
#include "content/public/browser/browser_main_parts.h"
|
|
|
|
|
|
|
|
namespace base {
|
|
|
|
class Thread;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace content {
|
|
|
|
struct MainFunctionParams;
|
|
|
|
}
|
|
|
|
|
|
|
|
class CefBrowserContext;
|
|
|
|
class CefDevToolsDelegate;
|
2012-04-11 20:00:55 +02:00
|
|
|
class MessageLoop;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
class CefBrowserMainParts : public content::BrowserMainParts {
|
|
|
|
public:
|
|
|
|
explicit CefBrowserMainParts(const content::MainFunctionParams& parameters);
|
|
|
|
virtual ~CefBrowserMainParts();
|
|
|
|
|
2012-04-11 20:00:55 +02:00
|
|
|
virtual void PreMainMessageLoopStart() OVERRIDE;
|
2012-04-03 03:34:16 +02:00
|
|
|
virtual int PreCreateThreads() OVERRIDE;
|
|
|
|
virtual void PreMainMessageLoopRun() OVERRIDE;
|
|
|
|
virtual void PostMainMessageLoopRun() OVERRIDE;
|
2012-06-28 19:21:18 +02:00
|
|
|
virtual void PostDestroyThreads() OVERRIDE;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
CefBrowserContext* browser_context() const { return browser_context_.get(); }
|
2012-04-27 00:20:18 +02:00
|
|
|
CefDevToolsDelegate* devtools_delegate() const { return devtools_delegate_; }
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void PlatformInitialize();
|
|
|
|
void PlatformCleanup();
|
|
|
|
|
|
|
|
scoped_ptr<CefBrowserContext> browser_context_;
|
|
|
|
|
2012-04-11 20:00:55 +02:00
|
|
|
scoped_ptr<MessageLoop> message_loop_;
|
2012-04-03 03:34:16 +02:00
|
|
|
CefDevToolsDelegate* devtools_delegate_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefBrowserMainParts);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_BROWSER_MAIN_H_
|