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

Side by Side Diff: mash/quick_launch/quick_launch_application.cc

Issue 2103863002: Fix bug in quicklaunch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mash/quick_launch/quick_launch_application.h" 5 #include "mash/quick_launch/quick_launch_application.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 DISALLOW_COPY_AND_ASSIGN(QuickLaunchUI); 152 DISALLOW_COPY_AND_ASSIGN(QuickLaunchUI);
153 }; 153 };
154 154
155 QuickLaunchApplication::QuickLaunchApplication() {} 155 QuickLaunchApplication::QuickLaunchApplication() {}
156 QuickLaunchApplication::~QuickLaunchApplication() {} 156 QuickLaunchApplication::~QuickLaunchApplication() {}
157 157
158 void QuickLaunchApplication::RemoveWindow(views::Widget* window) { 158 void QuickLaunchApplication::RemoveWindow(views::Widget* window) {
159 auto it = std::find(windows_.begin(), windows_.end(), window); 159 auto it = std::find(windows_.begin(), windows_.end(), window);
160 DCHECK(it != windows_.end()); 160 DCHECK(it != windows_.end());
161 windows_.erase(it); 161 windows_.erase(it);
162 if (windows_.empty()) 162 if (windows_.empty() && base::MessageLoop::current()->is_running())
163 base::MessageLoop::current()->QuitWhenIdle(); 163 base::MessageLoop::current()->QuitWhenIdle();
164 } 164 }
165 165
166 void QuickLaunchApplication::Initialize(shell::Connector* connector, 166 void QuickLaunchApplication::Initialize(shell::Connector* connector,
167 const shell::Identity& identity, 167 const shell::Identity& identity,
168 uint32_t id) { 168 uint32_t id) {
169 connector_ = connector; 169 connector_ = connector;
170 tracing_.Initialize(connector, identity.name()); 170 tracing_.Initialize(connector, identity.name());
171 171
172 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 172 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
(...skipping 25 matching lines...) Expand all
198 windows_.push_back(window); 198 windows_.push_back(window);
199 } 199 }
200 200
201 void QuickLaunchApplication::Create(shell::Connection* connection, 201 void QuickLaunchApplication::Create(shell::Connection* connection,
202 mojom::LaunchableRequest request) { 202 mojom::LaunchableRequest request) {
203 bindings_.AddBinding(this, std::move(request)); 203 bindings_.AddBinding(this, std::move(request));
204 } 204 }
205 205
206 } // namespace quick_launch 206 } // namespace quick_launch
207 } // namespace mash 207 } // namespace mash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698