cef/libcef/browser/browser_main.h
Marshall Greenblatt 3715c23777 Update to Chromium revision 140240.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@679 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2012-06-08 16:01:01 +00:00

53 lines
1.4 KiB
C++

// 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;
class MessageLoop;
class CefBrowserMainParts : public content::BrowserMainParts {
public:
explicit CefBrowserMainParts(const content::MainFunctionParams& parameters);
virtual ~CefBrowserMainParts();
virtual void PreMainMessageLoopStart() OVERRIDE;
virtual int PreCreateThreads() OVERRIDE;
virtual void PreMainMessageLoopRun() OVERRIDE;
virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
virtual void PostMainMessageLoopRun() OVERRIDE;
CefBrowserContext* browser_context() const { return browser_context_.get(); }
CefDevToolsDelegate* devtools_delegate() const { return devtools_delegate_; }
private:
void PlatformInitialize();
void PlatformCleanup();
scoped_ptr<CefBrowserContext> browser_context_;
scoped_ptr<MessageLoop> message_loop_;
CefDevToolsDelegate* devtools_delegate_;
DISALLOW_COPY_AND_ASSIGN(CefBrowserMainParts);
};
#endif // CEF_LIBCEF_BROWSER_BROWSER_MAIN_H_