OLD | NEW |
---|---|
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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <unordered_map> | |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/callback.h" | 17 #include "base/callback.h" |
17 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
18 #include "base/gtest_prod_util.h" | 19 #include "base/gtest_prod_util.h" |
19 #include "base/macros.h" | 20 #include "base/macros.h" |
20 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
21 #include "base/strings/string16.h" | 22 #include "base/strings/string16.h" |
22 #include "base/time/time.h" | 23 #include "base/time/time.h" |
23 #include "build/build_config.h" | 24 #include "build/build_config.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
802 // FrameTreeNode that is not a child of this node. | 803 // FrameTreeNode that is not a child of this node. |
803 FrameTreeNode* FindAndVerifyChild(int32_t child_frame_routing_id, | 804 FrameTreeNode* FindAndVerifyChild(int32_t child_frame_routing_id, |
804 bad_message::BadMessageReason reason); | 805 bad_message::BadMessageReason reason); |
805 | 806 |
806 // Creates Web Bluetooth Service owned by the frame. Returns a raw pointer | 807 // Creates Web Bluetooth Service owned by the frame. Returns a raw pointer |
807 // to it. | 808 // to it. |
808 WebBluetoothServiceImpl* CreateWebBluetoothService( | 809 WebBluetoothServiceImpl* CreateWebBluetoothService( |
809 mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request); | 810 mojo::InterfaceRequest<blink::mojom::WebBluetoothService> request); |
810 | 811 |
811 // Deletes the Web Bluetooth Service owned by the frame. | 812 // Deletes the Web Bluetooth Service owned by the frame. |
812 void DeleteWebBluetoothService(); | 813 void DeleteWebBluetoothService( |
814 WebBluetoothServiceImpl* web_bluetooth_service_ptr); | |
dougt
2016/12/16 00:11:44
nit: drop _ptr in the param name.
juncai
2016/12/17 01:18:51
Done.
| |
813 | 815 |
814 // service_manager::InterfaceFactory<media::mojom::InterfaceFactory> | 816 // service_manager::InterfaceFactory<media::mojom::InterfaceFactory> |
815 void Create(const service_manager::Identity& remote_identity, | 817 void Create(const service_manager::Identity& remote_identity, |
816 media::mojom::InterfaceFactoryRequest request) override; | 818 media::mojom::InterfaceFactoryRequest request) override; |
817 | 819 |
818 // Callback for connection error on the media::mojom::InterfaceFactory client. | 820 // Callback for connection error on the media::mojom::InterfaceFactory client. |
819 void OnMediaInterfaceFactoryConnectionError(); | 821 void OnMediaInterfaceFactoryConnectionError(); |
820 | 822 |
821 // Allows tests to disable the swapout event timer to simulate bugs that | 823 // Allows tests to disable the swapout event timer to simulate bugs that |
822 // happen before it fires (to avoid flakiness). | 824 // happen before it fires (to avoid flakiness). |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
983 service_manager::ServiceInfo renderer_info_; | 985 service_manager::ServiceInfo renderer_info_; |
984 | 986 |
985 int on_connect_handler_id_ = 0; | 987 int on_connect_handler_id_ = 0; |
986 | 988 |
987 #if defined(OS_ANDROID) | 989 #if defined(OS_ANDROID) |
988 // The filter for MessagePort messages between an Android apps and web. | 990 // The filter for MessagePort messages between an Android apps and web. |
989 scoped_refptr<AppWebMessagePortMessageFilter> | 991 scoped_refptr<AppWebMessagePortMessageFilter> |
990 app_web_message_port_message_filter_; | 992 app_web_message_port_message_filter_; |
991 #endif | 993 #endif |
992 | 994 |
993 std::unique_ptr<WebBluetoothServiceImpl> web_bluetooth_service_; | 995 std::unordered_map<WebBluetoothServiceImpl*, |
996 std::unique_ptr<WebBluetoothServiceImpl>> | |
997 web_bluetooth_services_; | |
dougt
2016/12/16 00:11:44
I think this needs a comment.
Reilly Grant (use Gerrit)
2016/12/16 01:41:28
You can use std::unordered_set<std::unique_ptr<Web
scheib
2016/12/16 06:33:17
;\ This is fairly hacky too.
How about find_if to
esprehn
2016/12/16 07:41:29
Thats bad because it's doing something linear for
juncai
2016/12/17 01:18:51
Use the same method that is used at:
https://cs.ch
| |
994 | 998 |
995 // The object managing the accessibility tree for this frame. | 999 // The object managing the accessibility tree for this frame. |
996 std::unique_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | 1000 std::unique_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; |
997 | 1001 |
998 // This is nonzero if we sent an accessibility reset to the renderer and | 1002 // This is nonzero if we sent an accessibility reset to the renderer and |
999 // we're waiting for an IPC containing this reset token (sequentially | 1003 // we're waiting for an IPC containing this reset token (sequentially |
1000 // assigned) and a complete replacement accessibility tree. | 1004 // assigned) and a complete replacement accessibility tree. |
1001 int accessibility_reset_token_; | 1005 int accessibility_reset_token_; |
1002 | 1006 |
1003 // A count of the number of times we needed to reset accessibility, so | 1007 // A count of the number of times we needed to reset accessibility, so |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1092 remote_associated_interfaces_; | 1096 remote_associated_interfaces_; |
1093 // NOTE: This must be the last member. | 1097 // NOTE: This must be the last member. |
1094 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1098 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1095 | 1099 |
1096 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1100 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1097 }; | 1101 }; |
1098 | 1102 |
1099 } // namespace content | 1103 } // namespace content |
1100 | 1104 |
1101 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1105 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |