Chromium Code Reviews| 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 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1181 | 1181 |
| 1182 RegisterMojoServices(); | 1182 RegisterMojoServices(); |
| 1183 | 1183 |
| 1184 // We delay calling this until we have the WebFrame so that any observer or | 1184 // We delay calling this until we have the WebFrame so that any observer or |
| 1185 // embedder can call GetWebFrame on any RenderFrame. | 1185 // embedder can call GetWebFrame on any RenderFrame. |
| 1186 GetContentClient()->renderer()->RenderFrameCreated(this); | 1186 GetContentClient()->renderer()->RenderFrameCreated(this); |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 void RenderFrameImpl::InitializeBlameContext(RenderFrameImpl* parent_frame) { | 1189 void RenderFrameImpl::InitializeBlameContext(RenderFrameImpl* parent_frame) { |
| 1190 DCHECK(!blame_context_); | 1190 DCHECK(!blame_context_); |
| 1191 blame_context_ = new FrameBlameContext(this, parent_frame); | 1191 blame_context_ = base::WrapUnique(new FrameBlameContext(this, parent_frame)); |
| 1192 blame_context_->Initialize(); | 1192 blame_context_->Initialize(); |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 RenderWidget* RenderFrameImpl::GetRenderWidget() { | 1195 RenderWidget* RenderFrameImpl::GetRenderWidget() { |
| 1196 RenderFrameImpl* local_root = | 1196 RenderFrameImpl* local_root = |
| 1197 RenderFrameImpl::FromWebFrame(frame_->localRoot()); | 1197 RenderFrameImpl::FromWebFrame(frame_->localRoot()); |
| 1198 return local_root->render_widget_.get(); | 1198 return local_root->render_widget_.get(); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 #if defined(ENABLE_PLUGINS) | 1201 #if defined(ENABLE_PLUGINS) |
| (...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2631 return NULL; | 2631 return NULL; |
| 2632 #endif | 2632 #endif |
| 2633 } | 2633 } |
| 2634 | 2634 |
| 2635 blink::WebCookieJar* RenderFrameImpl::cookieJar() { | 2635 blink::WebCookieJar* RenderFrameImpl::cookieJar() { |
| 2636 return &cookie_jar_; | 2636 return &cookie_jar_; |
| 2637 } | 2637 } |
| 2638 | 2638 |
| 2639 blink::BlameContext* RenderFrameImpl::frameBlameContext() { | 2639 blink::BlameContext* RenderFrameImpl::frameBlameContext() { |
| 2640 DCHECK(blame_context_); | 2640 DCHECK(blame_context_); |
| 2641 return blame_context_; | 2641 return blame_context_.get(); |
|
Primiano Tucci (use gerrit)
2016/06/10 07:50:35
how do you know that this is the right thread (The
Xiaocheng
2016/06/10 08:07:08
blame_context_ is an std::unique_ptr so we are saf
| |
| 2642 } | 2642 } |
| 2643 | 2643 |
| 2644 blink::WebServiceWorkerProvider* | 2644 blink::WebServiceWorkerProvider* |
| 2645 RenderFrameImpl::createServiceWorkerProvider() { | 2645 RenderFrameImpl::createServiceWorkerProvider() { |
| 2646 // At this point we should have non-null data source. | 2646 // At this point we should have non-null data source. |
| 2647 DCHECK(frame_->dataSource()); | 2647 DCHECK(frame_->dataSource()); |
| 2648 if (!ChildThreadImpl::current()) | 2648 if (!ChildThreadImpl::current()) |
| 2649 return nullptr; // May be null in some tests. | 2649 return nullptr; // May be null in some tests. |
| 2650 ServiceWorkerNetworkProvider* provider = | 2650 ServiceWorkerNetworkProvider* provider = |
| 2651 ServiceWorkerNetworkProvider::FromDocumentState( | 2651 ServiceWorkerNetworkProvider::FromDocumentState( |
| (...skipping 3452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6104 // event target. Potentially a Pepper plugin will receive the event. | 6104 // event target. Potentially a Pepper plugin will receive the event. |
| 6105 // In order to tell whether a plugin gets the last mouse event and which it | 6105 // In order to tell whether a plugin gets the last mouse event and which it |
| 6106 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6106 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6107 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6107 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6108 // |pepper_last_mouse_event_target_|. | 6108 // |pepper_last_mouse_event_target_|. |
| 6109 pepper_last_mouse_event_target_ = nullptr; | 6109 pepper_last_mouse_event_target_ = nullptr; |
| 6110 #endif | 6110 #endif |
| 6111 } | 6111 } |
| 6112 | 6112 |
| 6113 } // namespace content | 6113 } // namespace content |
| OLD | NEW |