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

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

Issue 2967943002: Update AuraInit to handle failed initialization (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/task_viewer/task_viewer.cc ('k') | ui/views/mus/aura_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/aura_init.h
diff --git a/ui/views/mus/aura_init.h b/ui/views/mus/aura_init.h
index 15deb095dd9f39226a8f813ce64677af6fc92e90..8cff91a6044b7061d778260726f64400c74d2661 100644
--- a/ui/views/mus/aura_init.h
+++ b/ui/views/mus/aura_init.h
@@ -51,42 +51,39 @@ class VIEWS_MUS_EXPORT AuraInit {
UI
};
+ AuraInit();
+ ~AuraInit();
+
+ // Returns true if AuraInit was able to successfully complete initialization.
+ // If this returns false, then Aura is in an unusable state, and calling
+ // services should shutdown.
// |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(),
- scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr,
- Mode mode = Mode::UI);
- ~AuraInit();
+ bool Init(
sadrul 2017/07/05 14:49:25 What do you think of making the ctor private, and
jonross 2017/07/05 14:54:13 SGTM
+ service_manager::Connector* connector,
+ const service_manager::Identity& identity,
+ const std::string& resource_file,
+ const std::string& resource_file_200 = std::string(),
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr,
+ Mode mode = Mode::UI);
// Only valid if Mode::AURA_MUS was passed to constructor.
MusClient* mus_client() { return mus_client_.get(); }
- // Returns true if AuraInit was able to successfully complete initialization.
- // If this returns false, then Aura is in an unusable state, and calling
- // services should shutdown.
- bool initialized() { return initialized_; }
-
private:
- bool InitializeResources(service_manager::Connector* connector);
+ bool InitializeResources(service_manager::Connector* connector,
+ const std::string& resource_file_,
+ const std::string& resource_file_200_);
sadrul 2017/07/05 14:49:24 no _ at the end
jonross 2017/07/05 17:51:31 Done.
#if defined(OS_LINUX)
sk_sp<font_service::FontLoader> font_loader_;
#endif
- const std::string resource_file_;
- const std::string resource_file_200_;
-
std::unique_ptr<aura::Env> env_;
std::unique_ptr<MusClient> mus_client_;
std::unique_ptr<ViewsDelegate> views_delegate_;
- // Whether or not initialization succeeds.
- bool initialized_ = false;
-
DISALLOW_COPY_AND_ASSIGN(AuraInit);
};
« no previous file with comments | « mash/task_viewer/task_viewer.cc ('k') | ui/views/mus/aura_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698