| 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::EmbedderFullscreenToggled(bool entered_fullscreen) { | 324 void WebViewGuest::EmbedderFullscreenToggled(bool entered_fullscreen) { |
| 325 is_embedder_fullscreen_ = entered_fullscreen; | 325 is_embedder_fullscreen_ = entered_fullscreen; |
| 326 // If the embedder has got out of fullscreen, we get out of fullscreen | 326 // If the embedder has got out of fullscreen, we get out of fullscreen |
| 327 // mode as well. | 327 // mode as well. |
| 328 if (!entered_fullscreen) | 328 if (!entered_fullscreen) |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1331 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 1332 DispatchEventToView( | 1332 DispatchEventToView( |
| 1333 new GuestViewBase::Event(webview::kEventExitFullscreen, args.Pass())); | 1333 new GuestViewBase::Event(webview::kEventExitFullscreen, args.Pass())); |
| 1334 } | 1334 } |
| 1335 // Since we changed fullscreen state, sending a Resize message ensures that | 1335 // Since we changed fullscreen state, sending a Resize message ensures that |
| 1336 // renderer/ sees the change. | 1336 // renderer/ sees the change. |
| 1337 web_contents()->GetRenderViewHost()->WasResized(); | 1337 web_contents()->GetRenderViewHost()->WasResized(); |
| 1338 } | 1338 } |
| 1339 | 1339 |
| 1340 } // namespace extensions | 1340 } // namespace extensions |
| OLD | NEW |