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