| 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 #ifndef CHROME_BROWSER_COMMAND_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_COMMAND_UPDATER_H_ |
| 6 #define CHROME_BROWSER_COMMAND_UPDATER_H_ | 6 #define CHROME_BROWSER_COMMAND_UPDATER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> |
| 9 | 10 |
| 10 #include "base/containers/hash_tables.h" | |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/base/window_open_disposition.h" | 12 #include "ui/base/window_open_disposition.h" |
| 13 | 13 |
| 14 class CommandObserver; | 14 class CommandObserver; |
| 15 class CommandUpdaterDelegate; | 15 class CommandUpdaterDelegate; |
| 16 | 16 |
| 17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
| 18 // | 18 // |
| 19 // CommandUpdater class | 19 // CommandUpdater class |
| 20 // | 20 // |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 class Command; | 70 class Command; |
| 71 | 71 |
| 72 // Get a Command node for a given command ID, creating an entry if it doesn't | 72 // Get a Command node for a given command ID, creating an entry if it doesn't |
| 73 // exist if desired. | 73 // exist if desired. |
| 74 Command* GetCommand(int id, bool create); | 74 Command* GetCommand(int id, bool create); |
| 75 | 75 |
| 76 // The delegate is responsible for executing commands. | 76 // The delegate is responsible for executing commands. |
| 77 CommandUpdaterDelegate* delegate_; | 77 CommandUpdaterDelegate* delegate_; |
| 78 | 78 |
| 79 // This is a map of command IDs to states and observer lists | 79 // This is a map of command IDs to states and observer lists |
| 80 base::hash_map<int, std::unique_ptr<Command>> commands_; | 80 std::unordered_map<int, std::unique_ptr<Command>> commands_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(CommandUpdater); | 82 DISALLOW_COPY_AND_ASSIGN(CommandUpdater); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 #endif // CHROME_BROWSER_COMMAND_UPDATER_H_ | 85 #endif // CHROME_BROWSER_COMMAND_UPDATER_H_ |
| OLD | NEW |