| 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 "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 ApplyAttributes(create_params); | 309 ApplyAttributes(create_params); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void WebViewGuest::AttachWebViewHelpers(WebContents* contents) { | 312 void WebViewGuest::AttachWebViewHelpers(WebContents* contents) { |
| 313 if (web_view_guest_delegate_) | 313 if (web_view_guest_delegate_) |
| 314 web_view_guest_delegate_->OnAttachWebViewHelpers(contents); | 314 web_view_guest_delegate_->OnAttachWebViewHelpers(contents); |
| 315 web_view_permission_helper_.reset(new WebViewPermissionHelper(this)); | 315 web_view_permission_helper_.reset(new WebViewPermissionHelper(this)); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void WebViewGuest::DidStopLoading() { | 318 void WebViewGuest::GuestViewDidStopLoading() { |
| 319 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 319 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 320 DispatchEventToView( | 320 DispatchEventToView( |
| 321 new GuestViewBase::Event(webview::kEventLoadStop, args.Pass())); | 321 new GuestViewBase::Event(webview::kEventLoadStop, args.Pass())); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void WebViewGuest::EmbedderWillBeDestroyed() { | 324 void WebViewGuest::EmbedderWillBeDestroyed() { |
| 325 // Clean up rules registries for the webview. | 325 // Clean up rules registries for the webview. |
| 326 RulesRegistryService::Get(browser_context()) | 326 RulesRegistryService::Get(browser_context()) |
| 327 ->RemoveRulesRegistriesByID(rules_registry_id_); | 327 ->RemoveRulesRegistriesByID(rules_registry_id_); |
| 328 WebViewKey key(owner_web_contents()->GetRenderProcessHost()->GetID(), | 328 WebViewKey key(owner_web_contents()->GetRenderProcessHost()->GetID(), |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 WebViewGuest::From(owner_web_contents()->GetRenderProcessHost()->GetID(), | 1258 WebViewGuest::From(owner_web_contents()->GetRenderProcessHost()->GetID(), |
| 1259 new_window_instance_id); | 1259 new_window_instance_id); |
| 1260 if (!guest) | 1260 if (!guest) |
| 1261 return; | 1261 return; |
| 1262 | 1262 |
| 1263 if (!allow) | 1263 if (!allow) |
| 1264 guest->Destroy(); | 1264 guest->Destroy(); |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 } // namespace extensions | 1267 } // namespace extensions |
| OLD | NEW |