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 2758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2769 if (!provider->context()) { | 2769 if (!provider->context()) { |
2770 // The context can be null when the frame is sandboxed. | 2770 // The context can be null when the frame is sandboxed. |
2771 return nullptr; | 2771 return nullptr; |
2772 } | 2772 } |
2773 return new WebServiceWorkerProviderImpl( | 2773 return new WebServiceWorkerProviderImpl( |
2774 ChildThreadImpl::current()->thread_safe_sender(), | 2774 ChildThreadImpl::current()->thread_safe_sender(), |
2775 provider->context()); | 2775 provider->context()); |
2776 } | 2776 } |
2777 | 2777 |
2778 void RenderFrameImpl::didAccessInitialDocument() { | 2778 void RenderFrameImpl::didAccessInitialDocument() { |
| 2779 // NOTE: Do not call back into JavaScript here, since this call is made from a |
| 2780 // V8 security check. |
| 2781 |
2779 // If the request hasn't yet committed, notify the browser process that it is | 2782 // If the request hasn't yet committed, notify the browser process that it is |
2780 // no longer safe to show the pending URL of the main frame, since a URL spoof | 2783 // no longer safe to show the pending URL of the main frame, since a URL spoof |
2781 // is now possible. (If the request has committed, the browser already knows.) | 2784 // is now possible. (If the request has committed, the browser already knows.) |
2782 if (!frame_->parent()) { | 2785 if (!frame_->parent()) { |
2783 DocumentState* document_state = | 2786 DocumentState* document_state = |
2784 DocumentState::FromDataSource(frame_->dataSource()); | 2787 DocumentState::FromDataSource(frame_->dataSource()); |
2785 NavigationStateImpl* navigation_state = | 2788 NavigationStateImpl* navigation_state = |
2786 static_cast<NavigationStateImpl*>(document_state->navigation_state()); | 2789 static_cast<NavigationStateImpl*>(document_state->navigation_state()); |
2787 | 2790 |
2788 if (!navigation_state->request_committed()) { | 2791 if (!navigation_state->request_committed()) { |
(...skipping 3577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 // event target. Potentially a Pepper plugin will receive the event. | 6369 // event target. Potentially a Pepper plugin will receive the event. |
6367 // In order to tell whether a plugin gets the last mouse event and which it | 6370 // In order to tell whether a plugin gets the last mouse event and which it |
6368 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6371 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6369 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6372 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6370 // |pepper_last_mouse_event_target_|. | 6373 // |pepper_last_mouse_event_target_|. |
6371 pepper_last_mouse_event_target_ = nullptr; | 6374 pepper_last_mouse_event_target_ = nullptr; |
6372 #endif | 6375 #endif |
6373 } | 6376 } |
6374 | 6377 |
6375 } // namespace content | 6378 } // namespace content |
OLD | NEW |