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

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: Removed base/scoped_array dependency. 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 // type. Returns false if no plugin was found. 286 // type. Returns false if no plugin was found.
287 // |actual_mime_type| is the actual mime type supported by the 287 // |actual_mime_type| is the actual mime type supported by the
288 // plugin found that match the URL given (one for each item in 288 // plugin found that match the URL given (one for each item in
289 // |info|). 289 // |info|).
290 CONTENT_EXPORT bool GetPluginInfo(const GURL& url, 290 CONTENT_EXPORT bool GetPluginInfo(const GURL& url,
291 const GURL& page_url, 291 const GURL& page_url,
292 const std::string& mime_type, 292 const std::string& mime_type,
293 webkit::WebPluginInfo* plugin_info, 293 webkit::WebPluginInfo* plugin_info,
294 std::string* actual_mime_type); 294 std::string* actual_mime_type);
295 295
296 // Helper function to check that TCP/UDP private APIs are allowed for current
297 // page. This check actually allows socket usage for NativeClient code only.
298 // It is better to move this check to browser process but Pepper message
299 // filters in browser process have no context about page that sent
300 // the request. Doing this check in render process is safe because NaCl code
301 // is executed in separate NaCl process.
302 bool CanUseSocketAPIs();
303
296 // IPC::Channel::Listener implementation ------------------------------------- 304 // IPC::Channel::Listener implementation -------------------------------------
297 305
298 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 306 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
299 307
300 // WebKit::WebWidgetClient implementation ------------------------------------ 308 // WebKit::WebWidgetClient implementation ------------------------------------
301 309
302 // Most methods are handled by RenderWidget. 310 // Most methods are handled by RenderWidget.
303 virtual void didFocus(); 311 virtual void didFocus();
304 virtual void didBlur(); 312 virtual void didBlur();
305 virtual void show(WebKit::WebNavigationPolicy policy); 313 virtual void show(WebKit::WebNavigationPolicy policy);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 const IPC::ChannelHandle& handle); 752 const IPC::ChannelHandle& handle);
745 void OnCancelDownload(int32 download_id); 753 void OnCancelDownload(int32 download_id);
746 void OnClearFocusedNode(); 754 void OnClearFocusedNode();
747 void OnClosePage(); 755 void OnClosePage();
748 #if defined(ENABLE_FLAPPER_HACKS) 756 #if defined(ENABLE_FLAPPER_HACKS)
749 void OnConnectTcpACK(int request_id, 757 void OnConnectTcpACK(int request_id,
750 IPC::PlatformFileForTransit socket_for_transit, 758 IPC::PlatformFileForTransit socket_for_transit,
751 const PP_NetAddress_Private& local_addr, 759 const PP_NetAddress_Private& local_addr,
752 const PP_NetAddress_Private& remote_addr); 760 const PP_NetAddress_Private& remote_addr);
753 #endif 761 #endif
762 void OnTCPSocketConnectACK(uint32 plugin_dispatcher_id,
763 uint32 socket_id,
764 bool succeeded,
765 const PP_NetAddress_Private& local_addr,
766 const PP_NetAddress_Private& remote_addr);
767 void OnTCPSocketSSLHandshakeACK(uint32 plugin_dispatcher_id,
768 uint32 socket_id,
769 bool succeeded);
770 void OnTCPSocketReadACK(uint32 plugin_dispatcher_id,
771 uint32 socket_id,
772 bool succeeded,
773 const std::string& data);
774 void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
775 uint32 socket_id,
776 bool succeeded,
777 int32_t bytes_written);
778 void OnUDPSocketBindACK(uint32 plugin_dispatcher_id,
779 uint32 socket_id,
780 bool succeeded);
781 void OnUDPSocketSendToACK(uint32 plugin_dispatcher_id,
782 uint32 socket_id,
783 bool succeeded,
784 int32_t bytes_written);
785 void OnUDPSocketRecvFromACK(uint32 plugin_dispatcher_id,
786 uint32 socket_id,
787 bool succeeded,
788 const std::string& data,
789 const PP_NetAddress_Private& addr);
790
754 void OnContextMenuClosed( 791 void OnContextMenuClosed(
755 const webkit_glue::CustomContextMenuContext& custom_context); 792 const webkit_glue::CustomContextMenuContext& custom_context);
756 void OnCopy(); 793 void OnCopy();
757 void OnCopyImageAt(int x, int y); 794 void OnCopyImageAt(int x, int y);
758 #if defined(OS_MACOSX) 795 #if defined(OS_MACOSX)
759 void OnCopyToFindPboard(); 796 void OnCopyToFindPboard();
760 #endif 797 #endif
761 void OnCut(); 798 void OnCut();
762 void OnCSSInsertRequest(const string16& frame_xpath, 799 void OnCSSInsertRequest(const string16& frame_xpath,
763 const std::string& css); 800 const std::string& css);
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 scoped_ptr<LoadProgressTracker> load_progress_tracker_; 1249 scoped_ptr<LoadProgressTracker> load_progress_tracker_;
1213 1250
1214 // All the registered observers. We expect this list to be small, so vector 1251 // All the registered observers. We expect this list to be small, so vector
1215 // is fine. 1252 // is fine.
1216 ObserverList<content::RenderViewObserver> observers_; 1253 ObserverList<content::RenderViewObserver> observers_;
1217 1254
1218 // Used to inform didChangeSelection() when it is called in the context 1255 // Used to inform didChangeSelection() when it is called in the context
1219 // of handling a ViewMsg_SelectRange IPC. 1256 // of handling a ViewMsg_SelectRange IPC.
1220 bool handling_select_range_; 1257 bool handling_select_range_;
1221 1258
1259 // Set of origins that can use TCP/UDP private APIs from NaCl.
1260 std::set<std::string> allowed_socket_origins_;
1261
1222 // --------------------------------------------------------------------------- 1262 // ---------------------------------------------------------------------------
1223 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1263 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1224 // sections rather than throwing it randomly at the end. If you're adding a 1264 // sections rather than throwing it randomly at the end. If you're adding a
1225 // bunch of stuff, you should probably create a helper class and put your 1265 // bunch of stuff, you should probably create a helper class and put your
1226 // data and methods on that to avoid bloating RenderView more. You can 1266 // data and methods on that to avoid bloating RenderView more. You can
1227 // use the Observer interface to filter IPC messages and receive frame change 1267 // use the Observer interface to filter IPC messages and receive frame change
1228 // notifications. 1268 // notifications.
1229 // --------------------------------------------------------------------------- 1269 // ---------------------------------------------------------------------------
1230 1270
1231 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1271 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1232 }; 1272 };
1233 1273
1234 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1274 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698