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