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

Unified Diff: ui/views/mus/aura_init.h

Issue 2471033005: Adds DesktopWindowTreeHostMus (Closed)
Patch Set: fix Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/mus/aura_init.h
diff --git a/ui/views/mus/aura_init.h b/ui/views/mus/aura_init.h
index 5dd00c0325005f30b70aed2948df95e05634d5ca..9ef2f2d9d1c28e446a88faa23ced229f03a0e332 100644
--- a/ui/views/mus/aura_init.h
+++ b/ui/views/mus/aura_init.h
@@ -16,6 +16,11 @@
namespace aura {
class Env;
+class WindowPort;
+}
+
+namespace base {
+class SingleThreadTaskRunner;
}
namespace font_service {
@@ -24,29 +29,44 @@ class FontLoader;
namespace service_manager {
class Connector;
+class Identity;
}
namespace views {
+class MusClient;
class ViewsDelegate;
// Sets up necessary state for aura when run with the viewmanager.
// |resource_file| is the path to the apk file containing the resources.
class VIEWS_MUS_EXPORT AuraInit {
public:
+ enum class Mode {
+ // Indicates AuraInit should target using aura with mus.
+ AURA_MUS,
+
+ // Indicates AuraInit should target using ui::Window.
+ UI,
+ };
+
// |resource_file| is the file to load strings and 1x icons from.
// |resource_file_200| can be an empty string, otherwise it is the file to
// load 2x icons from.
AuraInit(service_manager::Connector* connector,
+ const service_manager::Identity& identity,
const std::string& resource_file,
const std::string& resource_file_200 = std::string(),
- const aura::Env::WindowPortFactory& window_port_factory =
- aura::Env::WindowPortFactory());
-
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr,
+ Mode mode = Mode::UI);
~AuraInit();
+ // Only valid if Mode::AURA_MUS was passed to constructor.
+ MusClient* mus_client() { return mus_client_.get(); }
+
private:
void InitializeResources(service_manager::Connector* connector);
+ std::unique_ptr<aura::WindowPort> CreateWindowPort(aura::Window* window);
+
#if defined(OS_LINUX)
sk_sp<font_service::FontLoader> font_loader_;
#endif
@@ -54,6 +74,7 @@ class VIEWS_MUS_EXPORT AuraInit {
const std::string resource_file_;
const std::string resource_file_200_;
+ std::unique_ptr<MusClient> mus_client_;
std::unique_ptr<aura::Env> env_;
std::unique_ptr<ViewsDelegate> views_delegate_;
« no previous file with comments | « ui/views/mus/DEPS ('k') | ui/views/mus/aura_init.cc » ('j') | ui/views/mus/aura_init.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698