| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/renderer/render_frame_proxy.h" | 5 #include "content/renderer/render_frame_proxy.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 36 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 37 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 37 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 38 #include "third_party/WebKit/public/web/WebView.h" | 38 #include "third_party/WebKit/public/web/WebView.h" |
| 39 | 39 |
| 40 namespace content { | 40 namespace content { |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 // Facilitates lookup of RenderFrameProxy by routing_id. | 44 // Facilitates lookup of RenderFrameProxy by routing_id. |
| 45 typedef std::map<int, RenderFrameProxy*> RoutingIDProxyMap; | 45 typedef std::map<int, RenderFrameProxy*> RoutingIDProxyMap; |
| 46 static base::LazyInstance<RoutingIDProxyMap> g_routing_id_proxy_map = | 46 static base::LazyInstance<RoutingIDProxyMap>::DestructorAtExit |
| 47 LAZY_INSTANCE_INITIALIZER; | 47 g_routing_id_proxy_map = LAZY_INSTANCE_INITIALIZER; |
| 48 | 48 |
| 49 // Facilitates lookup of RenderFrameProxy by WebFrame. | 49 // Facilitates lookup of RenderFrameProxy by WebFrame. |
| 50 typedef std::map<blink::WebFrame*, RenderFrameProxy*> FrameMap; | 50 typedef std::map<blink::WebFrame*, RenderFrameProxy*> FrameMap; |
| 51 base::LazyInstance<FrameMap> g_frame_map = LAZY_INSTANCE_INITIALIZER; | 51 base::LazyInstance<FrameMap>::DestructorAtExit g_frame_map = |
| 52 LAZY_INSTANCE_INITIALIZER; |
| 52 | 53 |
| 53 } // namespace | 54 } // namespace |
| 54 | 55 |
| 55 // static | 56 // static |
| 56 RenderFrameProxy* RenderFrameProxy::CreateProxyToReplaceFrame( | 57 RenderFrameProxy* RenderFrameProxy::CreateProxyToReplaceFrame( |
| 57 RenderFrameImpl* frame_to_replace, | 58 RenderFrameImpl* frame_to_replace, |
| 58 int routing_id, | 59 int routing_id, |
| 59 blink::WebTreeScopeType scope) { | 60 blink::WebTreeScopeType scope) { |
| 60 CHECK_NE(routing_id, MSG_ROUTING_NONE); | 61 CHECK_NE(routing_id, MSG_ROUTING_NONE); |
| 61 | 62 |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 blink::WebLocalFrame* source) { | 527 blink::WebLocalFrame* source) { |
| 527 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 528 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 528 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 529 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 529 } | 530 } |
| 530 | 531 |
| 531 void RenderFrameProxy::frameFocused() { | 532 void RenderFrameProxy::frameFocused() { |
| 532 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 533 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 533 } | 534 } |
| 534 | 535 |
| 535 } // namespace | 536 } // namespace |
| OLD | NEW |