Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 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 CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/macros.h" | |
| 12 #include "base/strings/string16.h" | |
| 13 #include "content/common/content_export.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 class WebContents; | |
| 18 | |
| 19 // An interface consisting of methods that can be called to use Message ports. | |
| 20 class CONTENT_EXPORT MessagePortProvider { | |
| 21 public: | |
| 22 // Should be called on IO Thread. | |
| 23 static void PostMessageToFrame(WebContents* web_contents, | |
|
jochen (gone - plz use gerrit)
2014/11/18 13:29:41
please document what these methods do and how you'
sgurun-gerrit only
2014/11/18 22:51:55
Done.
| |
| 24 base::string16* source_origin, | |
|
jochen (gone - plz use gerrit)
2014/11/18 13:29:41
why aren't these const refs?
sgurun-gerrit only
2014/11/18 22:51:55
Done.
| |
| 25 base::string16* target_origin, | |
| 26 base::string16* data, | |
| 27 std::vector<int>* ports); | |
| 28 // Should be called on IO Thread. | |
| 29 static void CreateMessageChannel(WebContents* web_contents, | |
| 30 int* port1, | |
| 31 int* port2); | |
| 32 | |
| 33 private: | |
| 34 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePortProvider); | |
| 35 }; | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_PROVIDER_H_ | |
| OLD | NEW |