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

Unified Diff: ash/shelf/shelf_window_watcher.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ash/shelf/shelf_window_watcher.h ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_window_watcher.cc
diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc
index 0997d68906125bbadd4a003f6b67574ba0b68db5..25661b3d4f1f65351393ba0d8267f18ea19f7fa7 100644
--- a/ash/shelf/shelf_window_watcher.cc
+++ b/ash/shelf/shelf_window_watcher.cc
@@ -56,11 +56,9 @@ namespace ash {
ShelfWindowWatcher::RootWindowObserver::RootWindowObserver(
ShelfWindowWatcher* window_watcher)
- : window_watcher_(window_watcher) {
-}
+ : window_watcher_(window_watcher) {}
-ShelfWindowWatcher::RootWindowObserver::~RootWindowObserver() {
-}
+ShelfWindowWatcher::RootWindowObserver::~RootWindowObserver() {}
void ShelfWindowWatcher::RootWindowObserver::OnWindowDestroying(
aura::Window* window) {
@@ -69,11 +67,9 @@ void ShelfWindowWatcher::RootWindowObserver::OnWindowDestroying(
ShelfWindowWatcher::RemovedWindowObserver::RemovedWindowObserver(
ShelfWindowWatcher* window_watcher)
- : window_watcher_(window_watcher) {
-}
+ : window_watcher_(window_watcher) {}
-ShelfWindowWatcher::RemovedWindowObserver::~RemovedWindowObserver() {
-}
+ShelfWindowWatcher::RemovedWindowObserver::~RemovedWindowObserver() {}
void ShelfWindowWatcher::RemovedWindowObserver::OnWindowParentChanged(
aura::Window* window,
@@ -128,11 +124,10 @@ ShelfWindowWatcher::~ShelfWindowWatcher() {
}
void ShelfWindowWatcher::AddShelfItem(aura::Window* window) {
- const ShelfItemDetails* item_details =
- GetShelfItemDetailsForWindow(window);
+ const ShelfItemDetails* item_details = GetShelfItemDetailsForWindow(window);
ShelfItem item;
ShelfID id = model_->next_id();
- item.status = wm::IsActiveWindow(window) ? STATUS_ACTIVE: STATUS_RUNNING;
+ item.status = wm::IsActiveWindow(window) ? STATUS_ACTIVE : STATUS_RUNNING;
SetShelfItemDetailsForShelfItem(&item, *item_details);
SetShelfIDForWindow(id, window);
std::unique_ptr<ShelfItemDelegate> item_delegate(
@@ -155,9 +150,8 @@ void ShelfWindowWatcher::OnRootWindowAdded(WmWindow* root_window_wm) {
aura::client::GetActivationClient(root_window));
observed_root_windows_.Add(root_window);
- aura::Window* default_container = Shell::GetContainer(
- root_window,
- kShellWindowId_DefaultContainer);
+ aura::Window* default_container =
+ Shell::GetContainer(root_window, kShellWindowId_DefaultContainer);
observed_windows_.Add(default_container);
for (size_t i = 0; i < default_container->children().size(); ++i)
observed_windows_.Add(default_container->children()[i]);
@@ -179,8 +173,7 @@ void ShelfWindowWatcher::UpdateShelfItemStatus(aura::Window* window,
model_->Set(index, item);
}
-int ShelfWindowWatcher::GetShelfItemIndexForWindow(
- aura::Window* window) const {
+int ShelfWindowWatcher::GetShelfItemIndexForWindow(aura::Window* window) const {
return model_->ItemIndexByID(GetShelfIDForWindow(window));
}
@@ -258,8 +251,7 @@ void ShelfWindowWatcher::OnWindowPropertyChanged(aura::Window* window,
int index = GetShelfItemIndexForWindow(window);
DCHECK_GE(index, 0);
ShelfItem item = model_->items()[index];
- const ShelfItemDetails* details =
- GetShelfItemDetailsForWindow(window);
+ const ShelfItemDetails* details = GetShelfItemDetailsForWindow(window);
SetShelfItemDetailsForShelfItem(&item, *details);
model_->Set(index, item);
return;
« no previous file with comments | « ash/shelf/shelf_window_watcher.h ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698