1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "ui/views_content_client/views_content_client.h" 6 7 #include "content/public/app/content_main.h" 8 #include "ui/views_content_client/views_content_main_delegate.h" 9 10 namespace ui { 11 12 #if defined(OS_WIN) 13 ViewsContentClient::ViewsContentClient( 14 HINSTANCE instance, sandbox::SandboxInterfaceInfo* sandbox_info) 15 : instance_(instance), sandbox_info_(sandbox_info) { 16 } 17 #else 18 ViewsContentClient::ViewsContentClient(int argc, const char** argv) 19 : argc_(argc), argv_(argv) { 20 } 21 #endif 22 23 ViewsContentClient::~ViewsContentClient() { 24 } 25 26 int ViewsContentClient::RunMain() { 27 ViewsContentMainDelegate delegate(this); 28 content::ContentMainParams params(&delegate); 29 30 #if defined(OS_WIN) 31 params.instance = instance_; 32 params.sandbox_info = sandbox_info_; 33 #else 34 params.argc = argc_; 35 params.argv = argv_; 36 #endif 37 38 return content::ContentMain(params); 39 } 40 41 } // namespace ui 42