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

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: Deleted NaCl 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
yzshen1 2011/11/28 20:59:16 'Browser' -> 'browser', please.
ygorshenin 2011/11/29 18:30:09 Done.
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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 const IPC::ChannelHandle& handle); 746 const IPC::ChannelHandle& handle);
739 void OnCancelDownload(int32 download_id); 747 void OnCancelDownload(int32 download_id);
740 void OnClearFocusedNode(); 748 void OnClearFocusedNode();
741 void OnClosePage(); 749 void OnClosePage();
742 #if defined(ENABLE_FLAPPER_HACKS) 750 #if defined(ENABLE_FLAPPER_HACKS)
743 void OnConnectTcpACK(int request_id, 751 void OnConnectTcpACK(int request_id,
744 IPC::PlatformFileForTransit socket_for_transit, 752 IPC::PlatformFileForTransit socket_for_transit,
745 const PP_NetAddress_Private& local_addr, 753 const PP_NetAddress_Private& local_addr,
746 const PP_NetAddress_Private& remote_addr); 754 const PP_NetAddress_Private& remote_addr);
747 #endif 755 #endif
756 void OnTCPSocketConnectACK(uint32 plugin_dispatcher_id,
757 uint32 socket_id,
758 bool succeeded,
759 const PP_NetAddress_Private& local_addr,
760 const PP_NetAddress_Private& remote_addr);
761 void OnTCPSocketSSLHandshakeACK(uint32 plugin_dispatcher_id,
762 uint32 socket_id,
763 bool succeeded);
764 void OnTCPSocketReadACK(uint32 plugin_dispatcher_id,
765 uint32 socket_id,
766 bool succeeded,
767 const std::string& data);
768 void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
769 uint32 socket_id,
770 bool succeeded,
771 int32_t bytes_written);
772 void OnUDPSocketBindACK(uint32 plugin_dispatcher_id,
773 uint32 socket_id,
774 bool succeeded);
775 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id,
776 uint32 socket_id,
777 bool succeeded,
778 int32_t bytes_written);
779 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id,
780 uint32 socket_id,
781 bool succeeded,
782 const std::string& data,
783 const PP_NetAddress_Private& addr);
784
748 void OnContextMenuClosed( 785 void OnContextMenuClosed(
749 const webkit_glue::CustomContextMenuContext& custom_context); 786 const webkit_glue::CustomContextMenuContext& custom_context);
750 void OnCopy(); 787 void OnCopy();
751 void OnCopyImageAt(int x, int y); 788 void OnCopyImageAt(int x, int y);
752 #if defined(OS_MACOSX) 789 #if defined(OS_MACOSX)
753 void OnCopyToFindPboard(); 790 void OnCopyToFindPboard();
754 #endif 791 #endif
755 void OnCut(); 792 void OnCut();
756 void OnCSSInsertRequest(const string16& frame_xpath, 793 void OnCSSInsertRequest(const string16& frame_xpath,
757 const std::string& css); 794 const std::string& css);
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 scoped_ptr<LoadProgressTracker> load_progress_tracker_; 1243 scoped_ptr<LoadProgressTracker> load_progress_tracker_;
1207 1244
1208 // All the registered observers. We expect this list to be small, so vector 1245 // All the registered observers. We expect this list to be small, so vector
1209 // is fine. 1246 // is fine.
1210 ObserverList<content::RenderViewObserver> observers_; 1247 ObserverList<content::RenderViewObserver> observers_;
1211 1248
1212 // Used to inform didChangeSelection() when it is called in the context 1249 // Used to inform didChangeSelection() when it is called in the context
1213 // of handling a ViewMsg_SelectRange IPC. 1250 // of handling a ViewMsg_SelectRange IPC.
1214 bool handling_select_range_; 1251 bool handling_select_range_;
1215 1252
1253 // Set of origins that can use TCP/UDP private APIs from NaCl.
1254 std::set<std::string> allowed_socket_origins_;
1255
1216 // --------------------------------------------------------------------------- 1256 // ---------------------------------------------------------------------------
1217 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1257 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1218 // sections rather than throwing it randomly at the end. If you're adding a 1258 // sections rather than throwing it randomly at the end. If you're adding a
1219 // bunch of stuff, you should probably create a helper class and put your 1259 // bunch of stuff, you should probably create a helper class and put your
1220 // data and methods on that to avoid bloating RenderView more. You can 1260 // data and methods on that to avoid bloating RenderView more. You can
1221 // use the Observer interface to filter IPC messages and receive frame change 1261 // use the Observer interface to filter IPC messages and receive frame change
1222 // notifications. 1262 // notifications.
1223 // --------------------------------------------------------------------------- 1263 // ---------------------------------------------------------------------------
1224 1264
1225 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1265 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1226 }; 1266 };
1227 1267
1228 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1268 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698