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 5472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5483 | 5483 |
5484 // PlzNavigate: check if the navigation being committed originated as a | 5484 // PlzNavigate: check if the navigation being committed originated as a |
5485 // client redirect. | 5485 // client redirect. |
5486 bool is_client_redirect = | 5486 bool is_client_redirect = |
5487 browser_side_navigation | 5487 browser_side_navigation |
5488 ? !!(common_params.transition & ui::PAGE_TRANSITION_CLIENT_REDIRECT) | 5488 ? !!(common_params.transition & ui::PAGE_TRANSITION_CLIENT_REDIRECT) |
5489 : false; | 5489 : false; |
5490 | 5490 |
5491 // Perform a navigation to a data url if needed. | 5491 // Perform a navigation to a data url if needed. |
5492 // Note: the base URL might be invalid, so also check the data URL string. | 5492 // Note: the base URL might be invalid, so also check the data URL string. |
5493 if (!common_params.base_url_for_data_url.is_empty() || | 5493 bool should_load_data_url = !common_params.base_url_for_data_url.is_empty(); |
5494 #if defined(OS_ANDROID) | 5494 #if defined(OS_ANDROID) |
5495 !request_params.data_url_as_string.empty() || | 5495 should_load_data_url |= !request_params.data_url_as_string.empty(); |
5496 #endif | 5496 #endif |
5497 (browser_side_navigation && | 5497 if (should_load_data_url) { |
5498 common_params.url.SchemeIs(url::kDataScheme))) { | |
5499 LoadDataURL(common_params, request_params, frame_, load_type, | 5498 LoadDataURL(common_params, request_params, frame_, load_type, |
5500 item_for_history_navigation, history_load_type, | 5499 item_for_history_navigation, history_load_type, |
5501 is_client_redirect); | 5500 is_client_redirect); |
5502 } else { | 5501 } else { |
5503 // The load of the URL can result in this frame being removed. Use a | 5502 // The load of the URL can result in this frame being removed. Use a |
5504 // WeakPtr as an easy way to detect whether this has occured. If so, this | 5503 // WeakPtr as an easy way to detect whether this has occured. If so, this |
5505 // method should return immediately and not touch any part of the object, | 5504 // method should return immediately and not touch any part of the object, |
5506 // otherwise it will result in a use-after-free bug. | 5505 // otherwise it will result in a use-after-free bug. |
5507 base::WeakPtr<RenderFrameImpl> weak_this = weak_factory_.GetWeakPtr(); | 5506 base::WeakPtr<RenderFrameImpl> weak_this = weak_factory_.GetWeakPtr(); |
5508 | 5507 |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6168 // event target. Potentially a Pepper plugin will receive the event. | 6167 // event target. Potentially a Pepper plugin will receive the event. |
6169 // In order to tell whether a plugin gets the last mouse event and which it | 6168 // In order to tell whether a plugin gets the last mouse event and which it |
6170 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6169 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6171 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6170 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6172 // |pepper_last_mouse_event_target_|. | 6171 // |pepper_last_mouse_event_target_|. |
6173 pepper_last_mouse_event_target_ = nullptr; | 6172 pepper_last_mouse_event_target_ = nullptr; |
6174 #endif | 6173 #endif |
6175 } | 6174 } |
6176 | 6175 |
6177 } // namespace content | 6176 } // namespace content |
OLD | NEW |