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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 8688002: PPB_TCPSocket_Private/PPB_UDPSocket_Private are exposed to Browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added PPAPI_IN_PROCESS TCP and UDP tests. Created 9 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // type. Returns false if no plugin was found. 280 // type. Returns false if no plugin was found.
281 // |actual_mime_type| is the actual mime type supported by the 281 // |actual_mime_type| is the actual mime type supported by the
282 // plugin found that match the URL given (one for each item in 282 // plugin found that match the URL given (one for each item in
283 // |info|). 283 // |info|).
284 CONTENT_EXPORT bool GetPluginInfo(const GURL& url, 284 CONTENT_EXPORT bool GetPluginInfo(const GURL& url,
285 const GURL& page_url, 285 const GURL& page_url,
286 const std::string& mime_type, 286 const std::string& mime_type,
287 webkit::WebPluginInfo* plugin_info, 287 webkit::WebPluginInfo* plugin_info,
288 std::string* actual_mime_type); 288 std::string* actual_mime_type);
289 289
290 // Helper function to check that TCP/UDP private APIs are allowed for current
291 // page. This check actually allows socket usage for NativeClient code only.
292 // It is better to move this check to browser process but Pepper message
293 // filters in browser process have no context about page that sent
294 // the request. Doing this check in render process is safe because NaCl code
295 // is executed in separate NaCl process.
296 bool CanUseSocketAPIs();
297
290 // IPC::Channel::Listener implementation ------------------------------------- 298 // IPC::Channel::Listener implementation -------------------------------------
291 299
292 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 300 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
293 301
294 // WebKit::WebWidgetClient implementation ------------------------------------ 302 // WebKit::WebWidgetClient implementation ------------------------------------
295 303
296 // Most methods are handled by RenderWidget. 304 // Most methods are handled by RenderWidget.
297 virtual void didFocus(); 305 virtual void didFocus();
298 virtual void didBlur(); 306 virtual void didBlur();
299 virtual void show(WebKit::WebNavigationPolicy policy); 307 virtual void show(WebKit::WebNavigationPolicy policy);
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 const IPC::ChannelHandle& handle); 743 const IPC::ChannelHandle& handle);
736 void OnCancelDownload(int32 download_id); 744 void OnCancelDownload(int32 download_id);
737 void OnClearFocusedNode(); 745 void OnClearFocusedNode();
738 void OnClosePage(); 746 void OnClosePage();
739 #if defined(ENABLE_FLAPPER_HACKS) 747 #if defined(ENABLE_FLAPPER_HACKS)
740 void OnConnectTcpACK(int request_id, 748 void OnConnectTcpACK(int request_id,
741 IPC::PlatformFileForTransit socket_for_transit, 749 IPC::PlatformFileForTransit socket_for_transit,
742 const PP_NetAddress_Private& local_addr, 750 const PP_NetAddress_Private& local_addr,
743 const PP_NetAddress_Private& remote_addr); 751 const PP_NetAddress_Private& remote_addr);
744 #endif 752 #endif
753 void OnTCPSocketConnectACK(uint32 plugin_dispatcher_id,
754 uint32 socket_id,
755 bool succeeded,
756 const PP_NetAddress_Private& local_addr,
757 const PP_NetAddress_Private& remote_addr);
758 void OnTCPSocketSSLHandshakeACK(uint32 plugin_dispatcher_id,
759 uint32 socket_id,
760 bool succeeded);
761 void OnTCPSocketReadACK(uint32 plugin_dispatcher_id,
762 uint32 socket_id,
763 bool succeeded,
764 const std::string& data);
765 void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
766 uint32 socket_id,
767 bool succeeded,
768 int32_t bytes_written);
769 void OnUDPSocketBindACK(uint32 plugin_dispatcher_id,
770 uint32 socket_id,
771 bool succeeded);
772 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id,
773 uint32 socket_id,
774 bool succeeded,
775 int32_t bytes_written);
776 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id,
777 uint32 socket_id,
778 bool succeeded,
779 const std::string& data,
780 const PP_NetAddress_Private& addr);
781
745 void OnContextMenuClosed( 782 void OnContextMenuClosed(
746 const webkit_glue::CustomContextMenuContext& custom_context); 783 const webkit_glue::CustomContextMenuContext& custom_context);
747 void OnCopy(); 784 void OnCopy();
748 void OnCopyImageAt(int x, int y); 785 void OnCopyImageAt(int x, int y);
749 #if defined(OS_MACOSX) 786 #if defined(OS_MACOSX)
750 void OnCopyToFindPboard(); 787 void OnCopyToFindPboard();
751 #endif 788 #endif
752 void OnCut(); 789 void OnCut();
753 void OnCSSInsertRequest(const string16& frame_xpath, 790 void OnCSSInsertRequest(const string16& frame_xpath,
754 const std::string& css); 791 const std::string& css);
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 scoped_ptr<LoadProgressTracker> load_progress_tracker_; 1240 scoped_ptr<LoadProgressTracker> load_progress_tracker_;
1204 1241
1205 // All the registered observers. We expect this list to be small, so vector 1242 // All the registered observers. We expect this list to be small, so vector
1206 // is fine. 1243 // is fine.
1207 ObserverList<content::RenderViewObserver> observers_; 1244 ObserverList<content::RenderViewObserver> observers_;
1208 1245
1209 // Used to inform didChangeSelection() when it is called in the context 1246 // Used to inform didChangeSelection() when it is called in the context
1210 // of handling a ViewMsg_SelectRange IPC. 1247 // of handling a ViewMsg_SelectRange IPC.
1211 bool handling_select_range_; 1248 bool handling_select_range_;
1212 1249
1250 // Set of origins that can use TCP/UDP private APIs from NaCl.
1251 std::set<std::string> allowed_socket_origins_;
1252
1213 // --------------------------------------------------------------------------- 1253 // ---------------------------------------------------------------------------
1214 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1254 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1215 // sections rather than throwing it randomly at the end. If you're adding a 1255 // sections rather than throwing it randomly at the end. If you're adding a
1216 // bunch of stuff, you should probably create a helper class and put your 1256 // bunch of stuff, you should probably create a helper class and put your
1217 // data and methods on that to avoid bloating RenderView more. You can 1257 // data and methods on that to avoid bloating RenderView more. You can
1218 // use the Observer interface to filter IPC messages and receive frame change 1258 // use the Observer interface to filter IPC messages and receive frame change
1219 // notifications. 1259 // notifications.
1220 // --------------------------------------------------------------------------- 1260 // ---------------------------------------------------------------------------
1221 1261
1222 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1262 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1223 }; 1263 };
1224 1264
1225 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1265 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698