Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ui/views_content_client/views_content_client.h

Issue 387993004: MacViews: Change Widget context type to NativeWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_H_ 5 #ifndef UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_H_
6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_H_ 6 #define UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/views_content_client/views_content_client_export.h" 11 #include "ui/views_content_client/views_content_client_export.h"
12 12
13 namespace content { 13 namespace content {
14 class BrowserContext; 14 class BrowserContext;
15 } 15 }
16 16
17 namespace sandbox { 17 namespace sandbox {
18 struct SandboxInterfaceInfo; 18 struct SandboxInterfaceInfo;
19 } 19 }
20 20
21 namespace ui { 21 namespace ui {
22 22
23 // Creates a multiprocess views runtime for running an example application. 23 // Creates a multiprocess views runtime for running an example application.
24 // 24 //
25 // Sample usage: 25 // Sample usage:
26 // 26 //
27 // void InitMyApp(content::BrowserContext* browser_context, 27 // void InitMyApp(content::BrowserContext* browser_context,
28 // gfx::NativeView window_context) { 28 // gfx::NativeWindow window_context) {
29 // // Create desired windows and views here. Runs on the UI thread. 29 // // Create desired windows and views here. Runs on the UI thread.
30 // } 30 // }
31 // 31 //
32 // #if defined(OS_WIN) 32 // #if defined(OS_WIN)
33 // int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { 33 // int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
34 // sandbox::SandboxInterfaceInfo sandbox_info = {0}; 34 // sandbox::SandboxInterfaceInfo sandbox_info = {0};
35 // content::InitializeSandboxInfo(&sandbox_info); 35 // content::InitializeSandboxInfo(&sandbox_info);
36 // ui::ViewsContentClient params(instance, &sandbox_info); 36 // ui::ViewsContentClient params(instance, &sandbox_info);
37 // #else 37 // #else
38 // int main(int argc, const char** argv) { 38 // int main(int argc, const char** argv) {
39 // ui::ViewsContentClient params(argc, argv); 39 // ui::ViewsContentClient params(argc, argv);
40 // #endif 40 // #endif
41 // 41 //
42 // params.set_task(base::Bind(&InitMyApp)); 42 // params.set_task(base::Bind(&InitMyApp));
43 // return params.RunMain(); 43 // return params.RunMain();
44 // } 44 // }
45 class VIEWS_CONTENT_CLIENT_EXPORT ViewsContentClient { 45 class VIEWS_CONTENT_CLIENT_EXPORT ViewsContentClient {
46 public: 46 public:
47 typedef base::Callback< 47 typedef base::Callback<
48 void(content::BrowserContext* browser_context, 48 void(content::BrowserContext* browser_context,
49 gfx::NativeView window_context)> Task; 49 gfx::NativeWindow window_context)> Task;
50 50
51 #if defined(OS_WIN) 51 #if defined(OS_WIN)
52 ViewsContentClient(HINSTANCE instance, 52 ViewsContentClient(HINSTANCE instance,
53 sandbox::SandboxInterfaceInfo* sandbox_info); 53 sandbox::SandboxInterfaceInfo* sandbox_info);
54 #else 54 #else
55 ViewsContentClient(int argc, const char** argv); 55 ViewsContentClient(int argc, const char** argv);
56 #endif 56 #endif
57 57
58 ~ViewsContentClient(); 58 ~ViewsContentClient();
59 59
(...skipping 14 matching lines...) Expand all
74 const char** argv_; 74 const char** argv_;
75 #endif 75 #endif
76 Task task_; 76 Task task_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(ViewsContentClient); 78 DISALLOW_COPY_AND_ASSIGN(ViewsContentClient);
79 }; 79 };
80 80
81 } // namespace ui 81 } // namespace ui
82 82
83 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_H_ 83 #endif // UI_VIEWS_CONTENT_CLIENT_VIEWS_CONTENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698