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

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

Issue 1293253002: Connect WebUSB client interface to the devices app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/process/process_handle.h" 17 #include "base/process/process_handle.h"
18 #include "content/common/accessibility_mode_enums.h" 18 #include "content/common/accessibility_mode_enums.h"
19 #include "content/common/frame_message_enums.h" 19 #include "content/common/frame_message_enums.h"
20 #include "content/common/mojo/service_registry_impl.h" 20 #include "content/common/mojo/service_registry_impl.h"
21 #include "content/public/common/console_message_level.h" 21 #include "content/public/common/console_message_level.h"
22 #include "content/public/common/javascript_message_type.h" 22 #include "content/public/common/javascript_message_type.h"
23 #include "content/public/common/referrer.h" 23 #include "content/public/common/referrer.h"
24 #include "content/public/renderer/render_frame.h" 24 #include "content/public/renderer/render_frame.h"
25 #include "content/renderer/render_frame_proxy.h" 25 #include "content/renderer/render_frame_proxy.h"
26 #include "content/renderer/renderer_webcookiejar_impl.h" 26 #include "content/renderer/renderer_webcookiejar_impl.h"
27 #include "ipc/ipc_message.h" 27 #include "ipc/ipc_message.h"
28 #include "media/blink/webmediaplayer_delegate.h" 28 #include "media/blink/webmediaplayer_delegate.h"
29 #include "mojo/application/public/interfaces/service_provider.mojom.h"
30 #include "mojo/application/public/interfaces/shell.mojom.h"
29 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h" 31 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h"
30 #include "third_party/WebKit/public/web/WebAXObject.h" 32 #include "third_party/WebKit/public/web/WebAXObject.h"
31 #include "third_party/WebKit/public/web/WebDataSource.h" 33 #include "third_party/WebKit/public/web/WebDataSource.h"
32 #include "third_party/WebKit/public/web/WebFrameClient.h" 34 #include "third_party/WebKit/public/web/WebFrameClient.h"
33 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" 35 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
34 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" 36 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h"
35 #include "ui/gfx/range/range.h" 37 #include "ui/gfx/range/range.h"
36 38
37 #if defined(ENABLE_PLUGINS) 39 #if defined(ENABLE_PLUGINS)
38 #include "content/renderer/pepper/plugin_power_saver_helper.h" 40 #include "content/renderer/pepper/plugin_power_saver_helper.h"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 virtual bool enterFullscreen(); 540 virtual bool enterFullscreen();
539 virtual bool exitFullscreen(); 541 virtual bool exitFullscreen();
540 virtual blink::WebPermissionClient* permissionClient(); 542 virtual blink::WebPermissionClient* permissionClient();
541 virtual blink::WebAppBannerClient* appBannerClient(); 543 virtual blink::WebAppBannerClient* appBannerClient();
542 virtual void registerProtocolHandler(const blink::WebString& scheme, 544 virtual void registerProtocolHandler(const blink::WebString& scheme,
543 const blink::WebURL& url, 545 const blink::WebURL& url,
544 const blink::WebString& title); 546 const blink::WebString& title);
545 virtual void unregisterProtocolHandler(const blink::WebString& scheme, 547 virtual void unregisterProtocolHandler(const blink::WebString& scheme,
546 const blink::WebURL& url); 548 const blink::WebURL& url);
547 virtual blink::WebBluetooth* bluetooth(); 549 virtual blink::WebBluetooth* bluetooth();
550 virtual blink::WebUSBClient* usbClient();
548 551
549 #if defined(ENABLE_WEBVR) 552 #if defined(ENABLE_WEBVR)
550 blink::WebVRClient* webVRClient() override; 553 blink::WebVRClient* webVRClient() override;
551 #endif 554 #endif
552 555
553 // WebMediaPlayerDelegate implementation: 556 // WebMediaPlayerDelegate implementation:
554 void DidPlay(blink::WebMediaPlayer* player) override; 557 void DidPlay(blink::WebMediaPlayer* player) override;
555 void DidPause(blink::WebMediaPlayer* player) override; 558 void DidPause(blink::WebMediaPlayer* player) override;
556 void PlayerGone(blink::WebMediaPlayer* player) override; 559 void PlayerGone(blink::WebMediaPlayer* player) override;
557 560
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 media::interfaces::ServiceFactory* GetMediaServiceFactory(); 826 media::interfaces::ServiceFactory* GetMediaServiceFactory();
824 827
825 // Called when a connection error happened on |media_service_factory_|. 828 // Called when a connection error happened on |media_service_factory_|.
826 void OnMediaServiceFactoryConnectionError(); 829 void OnMediaServiceFactoryConnectionError();
827 #endif 830 #endif
828 831
829 media::CdmFactory* GetCdmFactory(); 832 media::CdmFactory* GetCdmFactory();
830 833
831 void RegisterMojoServices(); 834 void RegisterMojoServices();
832 835
836 // Connects to a Mojo application and returns a proxy to its exposed
837 // ServiceProvider.
838 mojo::ServiceProviderPtr ConnectToApplication(const GURL& url);
839
833 // Stores the WebLocalFrame we are associated with. This is null from the 840 // Stores the WebLocalFrame we are associated with. This is null from the
834 // constructor until SetWebFrame is called, and it is null after 841 // constructor until SetWebFrame is called, and it is null after
835 // frameDetached is called until destruction (which is asynchronous in the 842 // frameDetached is called until destruction (which is asynchronous in the
836 // case of the main frame, but not subframes). 843 // case of the main frame, but not subframes).
837 blink::WebLocalFrame* frame_; 844 blink::WebLocalFrame* frame_;
838 845
839 // Boolean value indicating whether this RenderFrameImpl object is for a 846 // Boolean value indicating whether this RenderFrameImpl object is for a
840 // subframe or not. It remains accurate during destruction, even when |frame_| 847 // subframe or not. It remains accurate during destruction, even when |frame_|
841 // has been invalidated. 848 // has been invalidated.
842 bool is_subframe_; 849 bool is_subframe_;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 982
976 // The push messaging dispatcher attached to this frame, lazily initialized. 983 // The push messaging dispatcher attached to this frame, lazily initialized.
977 PushMessagingDispatcher* push_messaging_dispatcher_; 984 PushMessagingDispatcher* push_messaging_dispatcher_;
978 985
979 // The presentation dispatcher implementation attached to this frame, lazily 986 // The presentation dispatcher implementation attached to this frame, lazily
980 // initialized. 987 // initialized.
981 PresentationDispatcher* presentation_dispatcher_; 988 PresentationDispatcher* presentation_dispatcher_;
982 989
983 ServiceRegistryImpl service_registry_; 990 ServiceRegistryImpl service_registry_;
984 991
992 // The shell proxy used to connect to Mojo applications.
993 mojo::ShellPtr mojo_shell_;
994
985 // The screen orientation dispatcher attached to the frame, lazily 995 // The screen orientation dispatcher attached to the frame, lazily
986 // initialized. 996 // initialized.
987 ScreenOrientationDispatcher* screen_orientation_dispatcher_; 997 ScreenOrientationDispatcher* screen_orientation_dispatcher_;
988 998
989 // The Manifest Manager handles the manifest requests from the browser 999 // The Manifest Manager handles the manifest requests from the browser
990 // process. 1000 // process.
991 ManifestManager* manifest_manager_; 1001 ManifestManager* manifest_manager_;
992 1002
993 // The current accessibility mode. 1003 // The current accessibility mode.
994 AccessibilityMode accessibility_mode_; 1004 AccessibilityMode accessibility_mode_;
995 1005
996 // Only valid if |accessibility_mode_| is anything other than 1006 // Only valid if |accessibility_mode_| is anything other than
997 // AccessibilityModeOff. 1007 // AccessibilityModeOff.
998 RendererAccessibility* renderer_accessibility_; 1008 RendererAccessibility* renderer_accessibility_;
999 1009
1000 scoped_ptr<PermissionDispatcher> permission_client_; 1010 scoped_ptr<PermissionDispatcher> permission_client_;
1001 1011
1002 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; 1012 scoped_ptr<blink::WebAppBannerClient> app_banner_client_;
1003 1013
1004 scoped_ptr<blink::WebBluetooth> bluetooth_; 1014 scoped_ptr<blink::WebBluetooth> bluetooth_;
1005 1015
1016 scoped_ptr<blink::WebUSBClient> usb_client_;
1017
1006 #if defined(ENABLE_WEBVR) 1018 #if defined(ENABLE_WEBVR)
1007 // The VR dispatcher attached to the frame, lazily initialized. 1019 // The VR dispatcher attached to the frame, lazily initialized.
1008 scoped_ptr<VRDispatcher> vr_dispatcher_; 1020 scoped_ptr<VRDispatcher> vr_dispatcher_;
1009 #endif 1021 #endif
1010 1022
1011 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1023 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1012 // The external popup for the currently showing select popup. 1024 // The external popup for the currently showing select popup.
1013 scoped_ptr<ExternalPopupMenu> external_popup_menu_; 1025 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
1014 #endif 1026 #endif
1015 1027
1016 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1028 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1017 1029
1018 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1030 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1019 }; 1031 };
1020 1032
1021 } // namespace content 1033 } // namespace content
1022 1034
1023 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1035 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698