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

Side by Side Diff: ui/views/mus/aura_init.cc

Issue 2511233002: Add the beginning of a simple window manager that we'll support on Windows. (Closed)
Patch Set: . Created 4 years 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
« no previous file with comments | « ui/views/mus/aura_init.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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/aura_init.h" 5 #include "ui/views/mus/aura_init.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } // namespace 48 } // namespace
49 49
50 AuraInit::AuraInit(service_manager::Connector* connector, 50 AuraInit::AuraInit(service_manager::Connector* connector,
51 const service_manager::Identity& identity, 51 const service_manager::Identity& identity,
52 const std::string& resource_file, 52 const std::string& resource_file,
53 const std::string& resource_file_200, 53 const std::string& resource_file_200,
54 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 54 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
55 Mode mode) 55 Mode mode)
56 : resource_file_(resource_file), 56 : resource_file_(resource_file),
57 resource_file_200_(resource_file_200), 57 resource_file_200_(resource_file_200),
58 env_(aura::Env::CreateInstance(mode == Mode::AURA_MUS 58 env_(aura::Env::CreateInstance(
59 ? aura::Env::Mode::MUS 59 (mode == Mode::AURA_MUS || mode == Mode::AURA_MUS_WINDOW_MANAGER)
60 : aura::Env::Mode::LOCAL)), 60 ? aura::Env::Mode::MUS
61 : aura::Env::Mode::LOCAL)),
61 views_delegate_(new MusViewsDelegate) { 62 views_delegate_(new MusViewsDelegate) {
62 if (mode == Mode::AURA_MUS) { 63 if (mode == Mode::AURA_MUS) {
63 mus_client_ = 64 mus_client_ =
64 base::WrapUnique(new MusClient(connector, identity, io_task_runner)); 65 base::WrapUnique(new MusClient(connector, identity, io_task_runner));
65 } 66 }
66 ui::MaterialDesignController::Initialize(); 67 ui::MaterialDesignController::Initialize();
67 InitializeResources(connector); 68 InitializeResources(connector);
68 69
69 // Initialize the skia font code to go ask fontconfig underneath. 70 // Initialize the skia font code to go ask fontconfig underneath.
70 #if defined(OS_LINUX) 71 #if defined(OS_LINUX)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( 112 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
112 std::move(pak_file), base::MemoryMappedFile::Region::kWholeFile); 113 std::move(pak_file), base::MemoryMappedFile::Region::kWholeFile);
113 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( 114 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile(
114 std::move(pak_file_2), ui::SCALE_FACTOR_100P); 115 std::move(pak_file_2), ui::SCALE_FACTOR_100P);
115 if (!resource_file_200_.empty()) 116 if (!resource_file_200_.empty())
116 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( 117 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile(
117 loader.TakeFile(resource_file_200_), ui::SCALE_FACTOR_200P); 118 loader.TakeFile(resource_file_200_), ui::SCALE_FACTOR_200P);
118 } 119 }
119 120
120 } // namespace views 121 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/aura_init.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698