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

Side by Side Diff: ash/mus/shelf_delegate_mus.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « ash/mus/main.cc ('k') | ash/mus/sysui_application.h » ('j') | 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 "ash/mus/shelf_delegate_mus.h" 5 #include "ash/mus/shelf_delegate_mus.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
10 #include "ash/shelf/shelf_item_delegate.h" 10 #include "ash/shelf/shelf_item_delegate.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 gfx::ImageSkia GetShelfIconFromSerializedBitmap( 107 gfx::ImageSkia GetShelfIconFromSerializedBitmap(
108 const mojo::Array<uint8_t>& serialized_bitmap) { 108 const mojo::Array<uint8_t>& serialized_bitmap) {
109 SkBitmap bitmap = mojo::ConvertTo<SkBitmap>(serialized_bitmap.storage()); 109 SkBitmap bitmap = mojo::ConvertTo<SkBitmap>(serialized_bitmap.storage());
110 return GetShelfIconFromBitmap(bitmap); 110 return GetShelfIconFromBitmap(bitmap);
111 } 111 }
112 112
113 } // namespace 113 } // namespace
114 114
115 ShelfDelegateMus::ShelfDelegateMus(ShelfModel* model) 115 ShelfDelegateMus::ShelfDelegateMus(ShelfModel* model)
116 : model_(model), binding_(this) { 116 : model_(model), binding_(this) {
117 mojo::Connector* connector = 117 ::shell::Connector* connector =
118 views::WindowManagerConnection::Get()->connector(); 118 views::WindowManagerConnection::Get()->connector();
119 connector->ConnectToInterface("mojo:desktop_wm", &user_window_controller_); 119 connector->ConnectToInterface("mojo:desktop_wm", &user_window_controller_);
120 user_window_controller_->AddUserWindowObserver( 120 user_window_controller_->AddUserWindowObserver(
121 binding_.CreateInterfacePtrAndBind()); 121 binding_.CreateInterfacePtrAndBind());
122 } 122 }
123 123
124 ShelfDelegateMus::~ShelfDelegateMus() {} 124 ShelfDelegateMus::~ShelfDelegateMus() {}
125 125
126 void ShelfDelegateMus::OnShelfCreated(Shelf* shelf) { 126 void ShelfDelegateMus::OnShelfCreated(Shelf* shelf) {
127 ShelfWidget* widget = shelf->shelf_widget(); 127 ShelfWidget* widget = shelf->shelf_widget();
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 DCHECK_GE(index, 0); 316 DCHECK_GE(index, 0);
317 ShelfItems::const_iterator iter = model_->ItemByID(shelf_id); 317 ShelfItems::const_iterator iter = model_->ItemByID(shelf_id);
318 DCHECK(iter != model_->items().end()); 318 DCHECK(iter != model_->items().end());
319 ShelfItem item = *iter; 319 ShelfItem item = *iter;
320 item.status = has_focus ? STATUS_ACTIVE : STATUS_RUNNING; 320 item.status = has_focus ? STATUS_ACTIVE : STATUS_RUNNING;
321 model_->Set(index, item); 321 model_->Set(index, item);
322 } 322 }
323 323
324 } // namespace sysui 324 } // namespace sysui
325 } // namespace ash 325 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/main.cc ('k') | ash/mus/sysui_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698