| OLD | NEW |
| 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/sysui/shelf_delegate_mus.h" | 5 #include "ash/sysui/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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 SkBitmap bitmap = mojo::ConvertTo<SkBitmap>(serialized_bitmap.storage()); | 177 SkBitmap bitmap = mojo::ConvertTo<SkBitmap>(serialized_bitmap.storage()); |
| 178 return GetShelfIconFromBitmap(bitmap); | 178 return GetShelfIconFromBitmap(bitmap); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace | 181 } // namespace |
| 182 | 182 |
| 183 ShelfDelegateMus::ShelfDelegateMus(ShelfModel* model) | 183 ShelfDelegateMus::ShelfDelegateMus(ShelfModel* model) |
| 184 : model_(model), binding_(this) { | 184 : model_(model), binding_(this) { |
| 185 ::shell::Connector* connector = | 185 ::shell::Connector* connector = |
| 186 views::WindowManagerConnection::Get()->connector(); | 186 views::WindowManagerConnection::Get()->connector(); |
| 187 connector->ConnectToInterface("mojo:desktop_wm", &shelf_layout_); | 187 connector->ConnectToInterface("mojo:ash", &shelf_layout_); |
| 188 connector->ConnectToInterface("mojo:desktop_wm", &user_window_controller_); | 188 connector->ConnectToInterface("mojo:ash", &user_window_controller_); |
| 189 user_window_controller_->AddUserWindowObserver( | 189 user_window_controller_->AddUserWindowObserver( |
| 190 binding_.CreateInterfacePtrAndBind()); | 190 binding_.CreateInterfacePtrAndBind()); |
| 191 } | 191 } |
| 192 | 192 |
| 193 ShelfDelegateMus::~ShelfDelegateMus() {} | 193 ShelfDelegateMus::~ShelfDelegateMus() {} |
| 194 | 194 |
| 195 /////////////////////////////////////////////////////////////////////////////// | 195 /////////////////////////////////////////////////////////////////////////////// |
| 196 // ShelfDelegate: | 196 // ShelfDelegate: |
| 197 | 197 |
| 198 void ShelfDelegateMus::OnShelfCreated(Shelf* shelf) { | 198 void ShelfDelegateMus::OnShelfCreated(Shelf* shelf) { |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 StatusAreaWidget* status_widget = widget->status_area_widget(); | 471 StatusAreaWidget* status_widget = widget->status_area_widget(); |
| 472 mus::Window* status_window = | 472 mus::Window* status_window = |
| 473 aura::GetMusWindow(status_widget->GetNativeWindow()); | 473 aura::GetMusWindow(status_widget->GetNativeWindow()); |
| 474 gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size(); | 474 gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size(); |
| 475 status_window->SetSharedProperty<gfx::Size>( | 475 status_window->SetSharedProperty<gfx::Size>( |
| 476 mus::mojom::WindowManager::kPreferredSize_Property, status_size); | 476 mus::mojom::WindowManager::kPreferredSize_Property, status_size); |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace sysui | 479 } // namespace sysui |
| 480 } // namespace ash | 480 } // namespace ash |
| OLD | NEW |