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

Side by Side Diff: android_webview/renderer/aw_message_port_client.h

Issue 831523004: Enable posting a message from JS to Android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 5 years, 11 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 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 ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
6 #define ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
7
8 #include <vector>
9
10 #include "base/strings/string16.h"
11 #include "content/public/renderer/render_frame_observer.h"
12
13 namespace android_webview {
14
15 // Renderer side of Android webview specific message port service. This service
16 // is used to convert messages from WebSerializedScriptValue to a base value.
17 class AwMessagePortClient : public content::RenderFrameObserver {
18 public:
19 explicit AwMessagePortClient(content::RenderFrame* render_frame);
20
21 private:
22 virtual ~AwMessagePortClient();
23
24 // RenderFrame::Observer
mnaganov (inactive) 2015/01/07 11:43:54 RenderFrameObserver
sgurun-gerrit only 2015/01/10 02:36:29 Done.
25 bool OnMessageReceived(const IPC::Message& message) override;
26
27 void OnPostMessage(int message_port_id,
28 const base::string16& message,
29 const std::vector<int>& sent_message_port_ids);
30 DISALLOW_COPY_AND_ASSIGN(AwMessagePortClient);
31 };
32
33 }
34
35 #endif // ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698