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

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

Issue 8775063: Revert 112693 - committed before review was done - Landing 8688002: PPB_TCPSocket_Private/PPB_UDP... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
304 // IPC::Channel::Listener implementation ------------------------------------- 296 // IPC::Channel::Listener implementation -------------------------------------
305 297
306 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 298 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
307 299
308 // WebKit::WebWidgetClient implementation ------------------------------------ 300 // WebKit::WebWidgetClient implementation ------------------------------------
309 301
310 // Most methods are handled by RenderWidget. 302 // Most methods are handled by RenderWidget.
311 virtual void didFocus(); 303 virtual void didFocus();
312 virtual void didBlur(); 304 virtual void didBlur();
313 virtual void show(WebKit::WebNavigationPolicy policy); 305 virtual void show(WebKit::WebNavigationPolicy policy);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 const IPC::ChannelHandle& handle); 744 const IPC::ChannelHandle& handle);
753 void OnCancelDownload(int32 download_id); 745 void OnCancelDownload(int32 download_id);
754 void OnClearFocusedNode(); 746 void OnClearFocusedNode();
755 void OnClosePage(); 747 void OnClosePage();
756 #if defined(ENABLE_FLAPPER_HACKS) 748 #if defined(ENABLE_FLAPPER_HACKS)
757 void OnConnectTcpACK(int request_id, 749 void OnConnectTcpACK(int request_id,
758 IPC::PlatformFileForTransit socket_for_transit, 750 IPC::PlatformFileForTransit socket_for_transit,
759 const PP_NetAddress_Private& local_addr, 751 const PP_NetAddress_Private& local_addr,
760 const PP_NetAddress_Private& remote_addr); 752 const PP_NetAddress_Private& remote_addr);
761 #endif 753 #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
791 void OnContextMenuClosed( 754 void OnContextMenuClosed(
792 const webkit_glue::CustomContextMenuContext& custom_context); 755 const webkit_glue::CustomContextMenuContext& custom_context);
793 void OnCopy(); 756 void OnCopy();
794 void OnCopyImageAt(int x, int y); 757 void OnCopyImageAt(int x, int y);
795 #if defined(OS_MACOSX) 758 #if defined(OS_MACOSX)
796 void OnCopyToFindPboard(); 759 void OnCopyToFindPboard();
797 #endif 760 #endif
798 void OnCut(); 761 void OnCut();
799 void OnCSSInsertRequest(const string16& frame_xpath, 762 void OnCSSInsertRequest(const string16& frame_xpath,
800 const std::string& css); 763 const std::string& css);
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 scoped_ptr<LoadProgressTracker> load_progress_tracker_; 1213 scoped_ptr<LoadProgressTracker> load_progress_tracker_;
1251 1214
1252 // All the registered observers. We expect this list to be small, so vector 1215 // All the registered observers. We expect this list to be small, so vector
1253 // is fine. 1216 // is fine.
1254 ObserverList<content::RenderViewObserver> observers_; 1217 ObserverList<content::RenderViewObserver> observers_;
1255 1218
1256 // Used to inform didChangeSelection() when it is called in the context 1219 // Used to inform didChangeSelection() when it is called in the context
1257 // of handling a ViewMsg_SelectRange IPC. 1220 // of handling a ViewMsg_SelectRange IPC.
1258 bool handling_select_range_; 1221 bool handling_select_range_;
1259 1222
1260 // Set of origins that can use TCP/UDP private APIs from NaCl.
1261 std::set<std::string> allowed_socket_origins_;
1262
1263 // --------------------------------------------------------------------------- 1223 // ---------------------------------------------------------------------------
1264 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1224 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1265 // sections rather than throwing it randomly at the end. If you're adding a 1225 // sections rather than throwing it randomly at the end. If you're adding a
1266 // bunch of stuff, you should probably create a helper class and put your 1226 // bunch of stuff, you should probably create a helper class and put your
1267 // data and methods on that to avoid bloating RenderView more. You can 1227 // data and methods on that to avoid bloating RenderView more. You can
1268 // use the Observer interface to filter IPC messages and receive frame change 1228 // use the Observer interface to filter IPC messages and receive frame change
1269 // notifications. 1229 // notifications.
1270 // --------------------------------------------------------------------------- 1230 // ---------------------------------------------------------------------------
1271 1231
1272 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1232 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1273 }; 1233 };
1274 1234
1275 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1235 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698