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

Side by Side Diff: mojo/services/html_viewer/web_message_port_channel_impl.h

Issue 1099303002: Move html_viewer from mojo/services to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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_SERVICES_HTML_VIEWER_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
6 #define MOJO_SERVICES_HTML_VIEWER_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "mojo/common/handle_watcher.h"
10 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
11 #include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h"
12
13 namespace html_viewer {
14
15 class WebMessagePortChannelImpl : public blink::WebMessagePortChannel {
16 public:
17 static void CreatePair(
18 blink::WebMessagePortChannel** channel1,
19 blink::WebMessagePortChannel** channel2);
20
21 private:
22 explicit WebMessagePortChannelImpl(mojo::ScopedMessagePipeHandle pipe);
23 virtual ~WebMessagePortChannelImpl();
24
25 // blink::WebMessagePortChannel implementation.
26 virtual void setClient(blink::WebMessagePortChannelClient* client);
27 virtual void destroy();
28 virtual void postMessage(const blink::WebString& message,
29 blink::WebMessagePortChannelArray* channels);
30 virtual bool tryGetMessage(blink::WebString* message,
31 blink::WebMessagePortChannelArray& channels);
32
33 void WaitForNextMessage();
34 void OnMessageAvailable(MojoResult result);
35
36 blink::WebMessagePortChannelClient* client_;
37 mojo::ScopedMessagePipeHandle pipe_;
38 mojo::common::HandleWatcher handle_watcher_;
39
40 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl);
41 };
42
43 } // namespace html_viewer
44
45 #endif // MOJO_SERVICES_HTML_VIEWER_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/web_media_player_factory.cc ('k') | mojo/services/html_viewer/web_message_port_channel_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698