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

Side by Side Diff: ui/views_content_client/views_content_main_delegate.cc

Issue 288313012: Revert of Repurpose views+content example into a generic multiprocess views runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « ui/views_content_client/views_content_main_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/views_content_client/views_content_main_delegate.h"
6
7 #include <string>
8
9 #include "base/command_line.h"
10 #include "base/files/file_path.h"
11 #include "base/logging.h"
12 #include "base/path_service.h"
13 #include "content/public/common/content_switches.h"
14 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/base/ui_base_paths.h"
16 #include "ui/views_content_client/views_content_browser_client.h"
17
18 #if defined(OS_WIN)
19 #include "base/logging_win.h"
20 #endif
21
22 namespace ui {
23 namespace {
24
25 #if defined(OS_WIN)
26 // {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A}
27 const GUID kViewsContentClientProviderName =
28 { 0x83fac8ee, 0x7a0e, 0x4dbb,
29 { 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } };
30 #endif
31
32 } // namespace
33
34 ViewsContentMainDelegate::ViewsContentMainDelegate(
35 ViewsContentClient* views_content_client)
36 : views_content_client_(views_content_client) {
37 }
38
39 ViewsContentMainDelegate::~ViewsContentMainDelegate() {
40 }
41
42 bool ViewsContentMainDelegate::BasicStartupComplete(int* exit_code) {
43 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
44 std::string process_type =
45 command_line.GetSwitchValueASCII(switches::kProcessType);
46
47 content::SetContentClient(&content_client_);
48
49 logging::LoggingSettings settings;
50 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
51 bool success = logging::InitLogging(settings);
52 CHECK(success);
53 #if defined(OS_WIN)
54 logging::LogEventProvider::Initialize(kViewsContentClientProviderName);
55 #endif
56
57 return false;
58 }
59
60 void ViewsContentMainDelegate::PreSandboxStartup() {
61 base::FilePath ui_test_pak_path;
62 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
63 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
64 }
65
66 content::ContentBrowserClient*
67 ViewsContentMainDelegate::CreateContentBrowserClient() {
68 browser_client_.reset(new ViewsContentBrowserClient(views_content_client_));
69 return browser_client_.get();
70 }
71
72 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views_content_client/views_content_main_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698