Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_EXAMPLES_PEPPER_CONTAINER_APP_INTERFACE_LIST_H_ | |
| 6 #define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_INTERFACE_LIST_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 | |
| 13 namespace mojo { | |
| 14 namespace examples { | |
| 15 | |
| 16 class InterfaceList { | |
|
viettrungluu
2014/03/21 04:20:00
Nit: Could use a class-level comment.
(I'm surpri
yzshen1
2014/03/21 17:52:08
Done.
We do have similar classes in Chrome, but we
| |
| 17 public: | |
| 18 InterfaceList(); | |
| 19 ~InterfaceList(); | |
| 20 | |
| 21 static InterfaceList* GetInstance(); | |
| 22 | |
| 23 const void* GetBrowserInterface(const std::string& name) const; | |
| 24 | |
| 25 private: | |
| 26 void AddBrowserInterface(const char* name, const void* interface); | |
| 27 | |
| 28 typedef std::map<std::string, const void*> NameToInterfaceMap; | |
| 29 NameToInterfaceMap browser_interfaces_; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(InterfaceList); | |
| 32 }; | |
| 33 | |
| 34 } // namespace examples | |
| 35 } // namespace mojo | |
| 36 | |
| 37 #endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_INTERFACE_LIST_H_ | |
| OLD | NEW |