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

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

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_ 5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
6 #define ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_ 6 #define ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "content/public/renderer/render_frame_observer.h" 12 #include "content/public/renderer/render_frame_observer.h"
13 13
14 namespace android_webview { 14 namespace android_webview {
15 15
16 // Renderer side of Android webview specific message port service. This service 16 // Renderer side of Android webview specific message port service. This service
17 // is used to convert messages from WebSerializedScriptValue to a base value. 17 // is used to convert messages from WebSerializedScriptValue to a base value.
18 class AwMessagePortClient : public content::RenderFrameObserver { 18 class AwMessagePortClient : public content::RenderFrameObserver {
19 public: 19 public:
20 explicit AwMessagePortClient(content::RenderFrame* render_frame); 20 explicit AwMessagePortClient(content::RenderFrame* render_frame);
21 21
22 private: 22 private:
23 ~AwMessagePortClient() override; 23 ~AwMessagePortClient() override;
24 24
25 // RenderFrameObserver 25 // RenderFrameObserver
26 bool OnMessageReceived(const IPC::Message& message) override; 26 bool OnMessageReceived(const IPC::Message& message) override;
27 void OnDestruct() override;
27 28
28 void OnWebToAppMessage(int message_port_id, 29 void OnWebToAppMessage(int message_port_id,
29 const base::string16& message, 30 const base::string16& message,
30 const std::vector<int>& sent_message_port_ids); 31 const std::vector<int>& sent_message_port_ids);
31 void OnAppToWebMessage(int message_port_id, 32 void OnAppToWebMessage(int message_port_id,
32 const base::string16& message, 33 const base::string16& message,
33 const std::vector<int>& sent_message_port_ids); 34 const std::vector<int>& sent_message_port_ids);
34 void OnClosePort(int message_port_id); 35 void OnClosePort(int message_port_id);
35 36
36 DISALLOW_COPY_AND_ASSIGN(AwMessagePortClient); 37 DISALLOW_COPY_AND_ASSIGN(AwMessagePortClient);
37 }; 38 };
38 39
39 } 40 }
40 41
41 #endif // ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_ 42 #endif // ANDROID_WEBVIEW_RENDERER_AW_MESSAGE_PORT_CLIENT_H_
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_content_settings_client.cc ('k') | android_webview/renderer/aw_message_port_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698