ExtensionSyncService: Properly differentiate between "pending install" and "pending...
[chromium-blink-merge.git] / android_webview / renderer / aw_message_port_client.h
bloba8b52537d21e5b3f1ef1dc55a80f46cc22ae05df
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.
5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
6 #define ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
8 #include <vector>
10 #include "base/strings/string16.h"
11 #include "content/public/renderer/render_frame_observer.h"
13 namespace android_webview {
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);
21 private:
22 ~AwMessagePortClient() override;
24 // RenderFrameObserver
25 bool OnMessageReceived(const IPC::Message& message) override;
27 void OnWebToAppMessage(int message_port_id,
28 const base::string16& message,
29 const std::vector<int>& sent_message_port_ids);
30 void OnAppToWebMessage(int message_port_id,
31 const base::string16& message,
32 const std::vector<int>& sent_message_port_ids);
33 void OnClosePort(int message_port_id);
35 DISALLOW_COPY_AND_ASSIGN(AwMessagePortClient);
40 #endif // ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_