cef/tests/cefclient/main_context_impl.h
Marshall Greenblatt fd5ededb27 - cefclient: Windows: Introduce RootWindow concept and associated window/client object hierarchy (issue #1500).
- cefclient: Remove locking from ClientHandlerShared that was only required for the Windows implementation (issue #1500).
- Add CefDeleteOnThread helper for deleting ref-counted types on a named CEF thread.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2001 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-01-27 00:03:25 +00:00

54 lines
1.5 KiB
C++

// Copyright (c) 2015 The Chromium Embedded Framework 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_TESTS_CEFCLIENT_MAIN_CONTEXT_IMPL_H_
#define CEF_TESTS_CEFCLIENT_MAIN_CONTEXT_IMPL_H_
#include "include/base/cef_scoped_ptr.h"
#include "include/cef_command_line.h"
#include "cefclient/main_context.h"
namespace client {
// Used to store global context in the browser process.
class MainContextImpl : public MainContext {
public:
MainContextImpl(int argc,
const char* const* argv
#if defined(OS_WIN)
, bool terminate_when_all_windows_closed
#endif
);
// MainContext members.
std::string GetConsoleLogPath() OVERRIDE;
std::string GetDownloadPath(const std::string& file_name) OVERRIDE;
std::string GetAppWorkingDirectory() OVERRIDE;
std::string GetMainURL() OVERRIDE;
void PopulateSettings(CefSettings* settings) OVERRIDE;
void PopulateBrowserSettings(CefBrowserSettings* settings) OVERRIDE;
#if defined(OS_WIN)
RootWindowManager* GetRootWindowManager() OVERRIDE;
#endif
private:
// Allow deletion via scoped_ptr only.
friend struct base::DefaultDeleter<MainContextImpl>;
~MainContextImpl() {}
CefRefPtr<CefCommandLine> command_line_;
std::string main_url_;
#if defined(OS_WIN)
scoped_ptr<RootWindowManager> root_window_manager_;
#endif
DISALLOW_COPY_AND_ASSIGN(MainContextImpl);
};
} // namespace client
#endif // CEF_TESTS_CEFCLIENT_MAIN_CONTEXT_IMPL_H_