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

Side by Side Diff: ui/views/examples/content_client/examples_main_delegate.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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/views/examples/content_client/examples_main_delegate.h" 5 #include "ui/views/examples/content_client/examples_main_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 14 matching lines...) Expand all
25 25
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 // {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A} 27 // {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A}
28 const GUID kViewsExamplesProviderName = 28 const GUID kViewsExamplesProviderName =
29 { 0x83fac8ee, 0x7a0e, 0x4dbb, 29 { 0x83fac8ee, 0x7a0e, 0x4dbb,
30 { 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } }; 30 { 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } };
31 #endif 31 #endif
32 32
33 } // namespace 33 } // namespace
34 34
35 ExamplesMainDelegate::ExamplesMainDelegate() { 35 ExamplesMainDelegate::ExamplesMainDelegate(
36 ExamplesMainParams* examples_params)
37 : examples_params_(examples_params) {
36 } 38 }
37 39
38 ExamplesMainDelegate::~ExamplesMainDelegate() { 40 ExamplesMainDelegate::~ExamplesMainDelegate() {
39 } 41 }
40 42
41 bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) { 43 bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) {
42 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 44 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
43 std::string process_type = 45 std::string process_type =
44 command_line.GetSwitchValueASCII(switches::kProcessType); 46 command_line.GetSwitchValueASCII(switches::kProcessType);
45 47
(...skipping 11 matching lines...) Expand all
57 } 59 }
58 60
59 void ExamplesMainDelegate::PreSandboxStartup() { 61 void ExamplesMainDelegate::PreSandboxStartup() {
60 base::FilePath ui_test_pak_path; 62 base::FilePath ui_test_pak_path;
61 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 63 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
62 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); 64 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
63 } 65 }
64 66
65 content::ContentBrowserClient* 67 content::ContentBrowserClient*
66 ExamplesMainDelegate::CreateContentBrowserClient() { 68 ExamplesMainDelegate::CreateContentBrowserClient() {
67 browser_client_.reset(new ExamplesContentBrowserClient); 69 browser_client_.reset(new ExamplesContentBrowserClient(examples_params_));
68 return browser_client_.get(); 70 return browser_client_.get();
69 } 71 }
70 72
71 } // namespace examples 73 } // namespace examples
72 } // namespace views 74 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/content_client/examples_main_delegate.h ('k') | ui/views/examples/content_client/examples_main_exe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698