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 "extensions/browser/guest_view/web_view/web_view_guest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" | 10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" |
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 NewWindowInfo new_window_info(params.url, info.name); | 1243 NewWindowInfo new_window_info(params.url, info.name); |
1244 new_window_info.changed = new_window_info.url != info.url; | 1244 new_window_info.changed = new_window_info.url != info.url; |
1245 it->second = new_window_info; | 1245 it->second = new_window_info; |
1246 return nullptr; | 1246 return nullptr; |
1247 } | 1247 } |
1248 | 1248 |
1249 // This code path is taken if RenderFrameImpl::DecidePolicyForNavigation | 1249 // This code path is taken if RenderFrameImpl::DecidePolicyForNavigation |
1250 // decides that a fork should happen. At the time of writing this comment, | 1250 // decides that a fork should happen. At the time of writing this comment, |
1251 // the only way a well behaving guest could hit this code path is if it | 1251 // the only way a well behaving guest could hit this code path is if it |
1252 // navigates to a URL that's associated with the default search engine. | 1252 // navigates to a URL that's associated with the default search engine. |
1253 // This list of URLs is generated by chrome::GetSearchURLs. Validity checks | 1253 // This list of URLs is generated by search::GetSearchURLs. Validity checks |
1254 // are performed inside LoadURLWithParams such that if the guest attempts | 1254 // are performed inside LoadURLWithParams such that if the guest attempts |
1255 // to navigate to a URL that it is not allowed to navigate to, a 'loadabort' | 1255 // to navigate to a URL that it is not allowed to navigate to, a 'loadabort' |
1256 // event will fire in the embedder, and the guest will be navigated to | 1256 // event will fire in the embedder, and the guest will be navigated to |
1257 // about:blank. | 1257 // about:blank. |
1258 if (params.disposition == CURRENT_TAB) { | 1258 if (params.disposition == CURRENT_TAB) { |
1259 LoadURLWithParams(params.url, params.referrer, params.transition, | 1259 LoadURLWithParams(params.url, params.referrer, params.transition, |
1260 params.transferred_global_request_id, | 1260 params.transferred_global_request_id, |
1261 true /* force_navigation */); | 1261 true /* force_navigation */); |
1262 return web_contents(); | 1262 return web_contents(); |
1263 } | 1263 } |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1449 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
1450 DispatchEventToView( | 1450 DispatchEventToView( |
1451 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1451 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
1452 } | 1452 } |
1453 // Since we changed fullscreen state, sending a Resize message ensures that | 1453 // Since we changed fullscreen state, sending a Resize message ensures that |
1454 // renderer/ sees the change. | 1454 // renderer/ sees the change. |
1455 web_contents()->GetRenderViewHost()->WasResized(); | 1455 web_contents()->GetRenderViewHost()->WasResized(); |
1456 } | 1456 } |
1457 | 1457 |
1458 } // namespace extensions | 1458 } // namespace extensions |
OLD | NEW |