| Index: ui/views_content_client/views_content_client.cc
|
| diff --git a/ui/views/examples/content_client/examples_main.cc b/ui/views_content_client/views_content_client.cc
|
| similarity index 35%
|
| rename from ui/views/examples/content_client/examples_main.cc
|
| rename to ui/views_content_client/views_content_client.cc
|
| index 559838713e8634bfb3b369f17893a7e176a7b413..a46cf8a622d7533206ff2a12e7640963ef33c87f 100644
|
| --- a/ui/views/examples/content_client/examples_main.cc
|
| +++ b/ui/views_content_client/views_content_client.cc
|
| @@ -2,31 +2,40 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "ui/views_content_client/views_content_client.h"
|
| +
|
| #include "content/public/app/content_main.h"
|
| -#include "ui/views/examples/content_client/examples_main_delegate.h"
|
| +#include "ui/views_content_client/views_content_main_delegate.h"
|
|
|
| -#if defined(OS_WIN)
|
| -#include "content/public/app/startup_helper_win.h"
|
| -#include "sandbox/win/src/sandbox_types.h"
|
| -#endif
|
| +namespace ui {
|
|
|
| #if defined(OS_WIN)
|
| -int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
|
| +ViewsContentClient::ViewsContentClient(
|
| + HINSTANCE instance, sandbox::SandboxInterfaceInfo* sandbox_info)
|
| + : instance_(instance), sandbox_info_(sandbox_info) {
|
| +}
|
| #else
|
| -int main(int argc, const char** argv) {
|
| +ViewsContentClient::ViewsContentClient(int argc, const char** argv)
|
| + : argc_(argc), argv_(argv) {
|
| +}
|
| #endif
|
| - views::examples::ExamplesMainDelegate delegate;
|
| +
|
| +ViewsContentClient::~ViewsContentClient() {
|
| +}
|
| +
|
| +int ViewsContentClient::RunMain() {
|
| + ViewsContentMainDelegate delegate(this);
|
| content::ContentMainParams params(&delegate);
|
|
|
| #if defined(OS_WIN)
|
| - sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
| - content::InitializeSandboxInfo(&sandbox_info);
|
| - params.instance = instance;
|
| - params.sandbox_info = &sandbox_info;
|
| + params.instance = instance_;
|
| + params.sandbox_info = sandbox_info_;
|
| #else
|
| - params.argc = argc;
|
| - params.argv = argv;
|
| + params.argc = argc_;
|
| + params.argv = argv_;
|
| #endif
|
|
|
| return content::ContentMain(params);
|
| }
|
| +
|
| +} // namespace ui
|
|
|