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

Side by Side Diff: ui/views/examples/content_client/examples_main_exe.cc

Issue 284113011: Repurpose views+content example into a generic multiprocess views runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: app_list_demo.cc using example_main Created 6 years, 7 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
(Empty)
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 "base/bind.h"
6 #include "content/public/browser/browser_context.h"
7 #include "ui/views/examples/content_client/examples_main.h"
8 #include "ui/views/examples/examples_window_with_content.h"
9
10 namespace {
11
12 void ShowWindow(content::BrowserContext* browser_context,
13 gfx::NativeView window_context) {
14 views::examples::ShowExamplesWindowWithContent(views::examples::QUIT_ON_CLOSE,
15 browser_context,
16 window_context);
17
18 // These lines serve no purpose other than to introduce an explicit content
19 // dependency. If the main executable doesn't have this dependency, the linker
20 // has more flexibility to reorder library dependencies in a shared component
21 // build. On linux, this can cause libc to appear before libcontent in the
22 // dlsym search path, which breaks assumptions made in
23 // sandbox::InitLibcUrandomOverrides().
24 // TODO(tapted): Remove this atrocity. http://crbug.com/374712
25 if (!browser_context) {
26 content::BrowserContext::SaveSessionState(NULL);
27 NOTREACHED();
28 }
29 }
30
31 } // namespace
32
33 #if defined(OS_WIN)
34 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
35 views::examples::ExamplesMainParams params(instance);
36 #else
37 int main(int argc, const char** argv) {
38 views::examples::ExamplesMainParams params(argc, argv);
39 #endif
40
41 params.set_task(base::Bind(&ShowWindow));
42 return params.RunMain();
43 }
OLDNEW
« no previous file with comments | « ui/views/examples/content_client/examples_main_delegate.cc ('k') | ui/views/examples/examples.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698