| 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/common/shelf/shelf_item_delegate.h" | 9 #include "ash/common/shelf/shelf_item_delegate.h" |
| 10 #include "ash/common/shelf/shelf_item_delegate_manager.h" | 10 #include "ash/common/shelf/shelf_item_delegate_manager.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 ~ShelfMenuModelMus() override {} | 82 ~ShelfMenuModelMus() override {} |
| 83 | 83 |
| 84 // ShelfMenuModel: | 84 // ShelfMenuModel: |
| 85 bool IsCommandActive(int command_id) const override { return false; } | 85 bool IsCommandActive(int command_id) const override { return false; } |
| 86 | 86 |
| 87 // ui::SimpleMenuModel::Delegate: | 87 // ui::SimpleMenuModel::Delegate: |
| 88 bool IsCommandIdChecked(int command_id) const override { return false; } | 88 bool IsCommandIdChecked(int command_id) const override { return false; } |
| 89 bool IsCommandIdEnabled(int command_id) const override { | 89 bool IsCommandIdEnabled(int command_id) const override { |
| 90 return command_id > 0; | 90 return command_id > 0; |
| 91 } | 91 } |
| 92 bool GetAcceleratorForCommandId(int command_id, | 92 bool GetAcceleratorForCommandId( |
| 93 ui::Accelerator* accelerator) override { | 93 int command_id, |
| 94 ui::Accelerator* accelerator) const override { |
| 94 return false; | 95 return false; |
| 95 } | 96 } |
| 96 void ExecuteCommand(int command_id, int event_flags) override { | 97 void ExecuteCommand(int command_id, int event_flags) override { |
| 97 item_delegate_->user_window_controller_->ActivateUserWindow(command_id); | 98 item_delegate_->user_window_controller_->ActivateUserWindow(command_id); |
| 98 } | 99 } |
| 99 | 100 |
| 100 private: | 101 private: |
| 101 ShelfItemDelegateMus* item_delegate_; | 102 ShelfItemDelegateMus* item_delegate_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(ShelfMenuModelMus); | 104 DISALLOW_COPY_AND_ASSIGN(ShelfMenuModelMus); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 StatusAreaWidget* status_widget = widget->status_area_widget(); | 473 StatusAreaWidget* status_widget = widget->status_area_widget(); |
| 473 ui::Window* status_window = | 474 ui::Window* status_window = |
| 474 aura::GetMusWindow(status_widget->GetNativeWindow()); | 475 aura::GetMusWindow(status_widget->GetNativeWindow()); |
| 475 gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size(); | 476 gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size(); |
| 476 status_window->SetSharedProperty<gfx::Size>( | 477 status_window->SetSharedProperty<gfx::Size>( |
| 477 ui::mojom::WindowManager::kPreferredSize_Property, status_size); | 478 ui::mojom::WindowManager::kPreferredSize_Property, status_size); |
| 478 } | 479 } |
| 479 | 480 |
| 480 } // namespace sysui | 481 } // namespace sysui |
| 481 } // namespace ash | 482 } // namespace ash |
| OLD | NEW |