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.
5 #ifndef UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_
6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/browser_main_parts.h"
13 class ShellBrowserContext
;
14 struct MainFunctionParams
;
23 class ViewsContentClient
;
25 class ViewsContentClientMainParts
: public content::BrowserMainParts
{
27 // Platform-specific create function.
28 static ViewsContentClientMainParts
* Create(
29 const content::MainFunctionParams
& content_params
,
30 ViewsContentClient
* views_content_client
);
32 ~ViewsContentClientMainParts() override
;
34 // content::BrowserMainParts:
35 void PreMainMessageLoopRun() override
;
36 bool MainMessageLoopRun(int* result_code
) override
;
37 void PostMainMessageLoopRun() override
;
39 content::ShellBrowserContext
* browser_context() {
40 return browser_context_
.get();
43 ViewsContentClient
* views_content_client() {
44 return views_content_client_
;
48 ViewsContentClientMainParts(
49 const content::MainFunctionParams
& content_params
,
50 ViewsContentClient
* views_content_client
);
53 scoped_ptr
<content::ShellBrowserContext
> browser_context_
;
55 scoped_ptr
<views::ViewsDelegate
> views_delegate_
;
57 ViewsContentClient
* views_content_client_
;
59 DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainParts
);
64 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_