| 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 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2918 // Save these to be processed when the ensuing navigation is committed. | 2918 // Save these to be processed when the ensuing navigation is committed. |
| 2919 WebSearchableFormData web_searchable_form_data(form); | 2919 WebSearchableFormData web_searchable_form_data(form); |
| 2920 internal_data->set_searchable_form_url(web_searchable_form_data.url()); | 2920 internal_data->set_searchable_form_url(web_searchable_form_data.url()); |
| 2921 internal_data->set_searchable_form_encoding( | 2921 internal_data->set_searchable_form_encoding( |
| 2922 web_searchable_form_data.encoding().utf8()); | 2922 web_searchable_form_data.encoding().utf8()); |
| 2923 | 2923 |
| 2924 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WillSubmitForm(form)); | 2924 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WillSubmitForm(form)); |
| 2925 } | 2925 } |
| 2926 | 2926 |
| 2927 void RenderFrameImpl::didCreateDataSource(blink::WebLocalFrame* frame, | 2927 void RenderFrameImpl::didCreateDataSource(blink::WebLocalFrame* frame, |
| 2928 blink::WebDataSource* datasource) { | 2928 blink::WebDataSource* datasource, |
| 2929 int initiator) { |
| 2929 DCHECK(!frame_ || frame_ == frame); | 2930 DCHECK(!frame_ || frame_ == frame); |
| 2930 | 2931 |
| 2931 bool content_initiated = !pending_navigation_params_.get(); | 2932 bool content_initiated = !pending_navigation_params_.get(); |
| 2933 if (initiator != 0) |
| 2934 DCHECK_EQ(content_initiated, initiator == 1); |
| 2932 | 2935 |
| 2933 // Make sure any previous redirect URLs end up in our new data source. | 2936 // Make sure any previous redirect URLs end up in our new data source. |
| 2934 if (pending_navigation_params_.get()) { | 2937 if (pending_navigation_params_.get()) { |
| 2935 for (const auto& i : | 2938 for (const auto& i : |
| 2936 pending_navigation_params_->request_params.redirects) { | 2939 pending_navigation_params_->request_params.redirects) { |
| 2937 datasource->appendRedirect(i); | 2940 datasource->appendRedirect(i); |
| 2938 } | 2941 } |
| 2939 } | 2942 } |
| 2940 | 2943 |
| 2941 DocumentState* document_state = DocumentState::FromDataSource(datasource); | 2944 DocumentState* document_state = DocumentState::FromDataSource(datasource); |
| (...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6139 // event target. Potentially a Pepper plugin will receive the event. | 6142 // event target. Potentially a Pepper plugin will receive the event. |
| 6140 // In order to tell whether a plugin gets the last mouse event and which it | 6143 // In order to tell whether a plugin gets the last mouse event and which it |
| 6141 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6144 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6142 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6145 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6143 // |pepper_last_mouse_event_target_|. | 6146 // |pepper_last_mouse_event_target_|. |
| 6144 pepper_last_mouse_event_target_ = nullptr; | 6147 pepper_last_mouse_event_target_ = nullptr; |
| 6145 #endif | 6148 #endif |
| 6146 } | 6149 } |
| 6147 | 6150 |
| 6148 } // namespace content | 6151 } // namespace content |
| OLD | NEW |