Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ui / views_content_client / views_content_client_main_parts.h
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 #ifndef UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_
6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/browser_main_parts.h"
11
12 namespace content {
13 class ShellBrowserContext;
14 struct MainFunctionParams;
15 }
16
17 namespace views {
18 class ViewsDelegate;
19 }
20
21 namespace ui {
22
23 class ViewsContentClient;
24
25 class ViewsContentClientMainParts : public content::BrowserMainParts {
26  public:
27   // Platform-specific create function.
28   static ViewsContentClientMainParts* Create(
29       const content::MainFunctionParams& content_params,
30       ViewsContentClient* views_content_client);
31
32   ~ViewsContentClientMainParts() override;
33
34   // content::BrowserMainParts:
35   void PreMainMessageLoopRun() override;
36   bool MainMessageLoopRun(int* result_code) override;
37   void PostMainMessageLoopRun() override;
38
39   content::ShellBrowserContext* browser_context() {
40     return browser_context_.get();
41   }
42
43   ViewsContentClient* views_content_client() {
44     return views_content_client_;
45   }
46
47  protected:
48   ViewsContentClientMainParts(
49       const content::MainFunctionParams& content_params,
50       ViewsContentClient* views_content_client);
51
52  private:
53   scoped_ptr<content::ShellBrowserContext> browser_context_;
54
55   scoped_ptr<views::ViewsDelegate> views_delegate_;
56
57   ViewsContentClient* views_content_client_;
58
59   DISALLOW_COPY_AND_ASSIGN(ViewsContentClientMainParts);
60 };
61
62 }  // namespace ui
63
64 #endif  // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_MAIN_PARTS_H_