Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1426)

Unified Diff: mojo/examples/pepper_container_app/interface_list.h

Issue 178953003: Mojo container example for hosting Pepper plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/examples/pepper_container_app/interface_list.h
diff --git a/mojo/examples/pepper_container_app/interface_list.h b/mojo/examples/pepper_container_app/interface_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..0518f1acaaae169908c981328d9a712304d90a8b
--- /dev/null
+++ b/mojo/examples/pepper_container_app/interface_list.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EXAMPLES_PEPPER_CONTAINER_APP_INTERFACE_LIST_H_
+#define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_INTERFACE_LIST_H_
+
+#include <map>
+#include <string>
+
+#include "base/macros.h"
+
+namespace mojo {
+namespace examples {
+
+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
+ public:
+ InterfaceList();
+ ~InterfaceList();
+
+ static InterfaceList* GetInstance();
+
+ const void* GetBrowserInterface(const std::string& name) const;
+
+ private:
+ void AddBrowserInterface(const char* name, const void* interface);
+
+ typedef std::map<std::string, const void*> NameToInterfaceMap;
+ NameToInterfaceMap browser_interfaces_;
+
+ DISALLOW_COPY_AND_ASSIGN(InterfaceList);
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_INTERFACE_LIST_H_

Powered by Google App Engine
This is Rietveld 408576698