| Index: content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc
|
| diff --git a/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc b/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc
|
| index ec3c0d61c34bc749633f890ddc3b43e58ed2b500..07ecbe0cb3b16959e5767e2022c3231df452dc9e 100644
|
| --- a/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc
|
| +++ b/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc
|
| @@ -4,61 +4,43 @@
|
|
|
| #include "content/browser/browser_plugin/test_browser_plugin_guest_delegate.h"
|
|
|
| +#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
| +#include "content/browser/web_contents/web_contents_impl.h"
|
| +#include "content/public/browser/navigation_controller.h"
|
| +#include "content/public/common/referrer.h"
|
| +
|
| namespace content {
|
|
|
| -TestBrowserPluginGuestDelegate::TestBrowserPluginGuestDelegate()
|
| - : load_aborted_(false) {
|
| +TestBrowserPluginGuestDelegate::TestBrowserPluginGuestDelegate(
|
| + BrowserPluginGuest* guest) :
|
| + guest_(guest) {
|
| }
|
|
|
| TestBrowserPluginGuestDelegate::~TestBrowserPluginGuestDelegate() {
|
| }
|
|
|
| -void TestBrowserPluginGuestDelegate::ResetStates() {
|
| - load_aborted_ = false;
|
| - load_aborted_url_ = GURL();
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::AddMessageToConsole(
|
| - int32 level,
|
| - const base::string16& message,
|
| - int32 line_no,
|
| - const base::string16& source_id) {
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::Close() {
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::GuestProcessGone(
|
| - base::TerminationStatus status) {
|
| -}
|
| -
|
| -bool TestBrowserPluginGuestDelegate::HandleKeyboardEvent(
|
| - const NativeWebKeyboardEvent& event) {
|
| - return BrowserPluginGuestDelegate::HandleKeyboardEvent(event);
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::LoadAbort(bool is_top_level,
|
| - const GURL& url,
|
| - const std::string& error_type) {
|
| - load_aborted_ = true;
|
| - load_aborted_url_ = url;
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::RendererResponsive() {
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::RendererUnresponsive() {
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::RequestPermission(
|
| - BrowserPluginPermissionType permission_type,
|
| - const base::DictionaryValue& request_info,
|
| - const PermissionResponseCallback& callback,
|
| - bool allowed_by_default) {
|
| -}
|
| -
|
| -void TestBrowserPluginGuestDelegate::SizeChanged(const gfx::Size& old_size,
|
| - const gfx::Size& new_size) {
|
| +void TestBrowserPluginGuestDelegate::LoadURLWithParams(
|
| + const GURL& url,
|
| + const Referrer& referrer,
|
| + PageTransition transition_type,
|
| + WebContents* web_contents) {
|
| + NavigationController::LoadURLParams load_url_params(url);
|
| + load_url_params.referrer = referrer;
|
| + load_url_params.transition_type = transition_type;
|
| + load_url_params.extra_headers = std::string();
|
| + if (IsOverridingUserAgent()) {
|
| + load_url_params.override_user_agent =
|
| + NavigationController::UA_OVERRIDE_TRUE;
|
| + }
|
| + web_contents->GetController().LoadURLWithParams(load_url_params);
|
| +}
|
| +
|
| +void TestBrowserPluginGuestDelegate::NavigateGuest(const std::string& src) {
|
| + GURL url(src);
|
| + LoadURLWithParams(url,
|
| + Referrer(),
|
| + PAGE_TRANSITION_AUTO_TOPLEVEL,
|
| + guest_->GetWebContents());
|
| }
|
|
|
| } // namespace content
|
|
|