| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate { | 109 class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate { |
| 110 public: | 110 public: |
| 111 SimpleMenuDelegate() {} | 111 SimpleMenuDelegate() {} |
| 112 ~SimpleMenuDelegate() override {} | 112 ~SimpleMenuDelegate() override {} |
| 113 | 113 |
| 114 bool IsCommandIdChecked(int command_id) const override { return false; } | 114 bool IsCommandIdChecked(int command_id) const override { return false; } |
| 115 | 115 |
| 116 bool IsCommandIdEnabled(int command_id) const override { return true; } | 116 bool IsCommandIdEnabled(int command_id) const override { return true; } |
| 117 | 117 |
| 118 bool GetAcceleratorForCommandId(int command_id, | |
| 119 ui::Accelerator* accelerator) const override { | |
| 120 return false; | |
| 121 } | |
| 122 | |
| 123 void ExecuteCommand(int command_id, int event_flags) override {} | 118 void ExecuteCommand(int command_id, int event_flags) override {} |
| 124 | 119 |
| 125 private: | 120 private: |
| 126 DISALLOW_COPY_AND_ASSIGN(SimpleMenuDelegate); | 121 DISALLOW_COPY_AND_ASSIGN(SimpleMenuDelegate); |
| 127 }; | 122 }; |
| 128 | 123 |
| 129 } // namespace | 124 } // namespace |
| 130 | 125 |
| 131 class ShellTest : public test::AshTestBase { | 126 class ShellTest : public test::AshTestBase { |
| 132 public: | 127 public: |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 private: | 503 private: |
| 509 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 504 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
| 510 }; | 505 }; |
| 511 | 506 |
| 512 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 507 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
| 513 window_.reset(new aura::Window(NULL)); | 508 window_.reset(new aura::Window(NULL)); |
| 514 window_->Init(ui::LAYER_NOT_DRAWN); | 509 window_->Init(ui::LAYER_NOT_DRAWN); |
| 515 } | 510 } |
| 516 | 511 |
| 517 } // namespace ash | 512 } // namespace ash |
| OLD | NEW |