1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_
8 #include "content/public/browser/browser_plugin_guest_delegate.h"
12 class TestBrowserPluginGuestDelegate : public BrowserPluginGuestDelegate {
14 TestBrowserPluginGuestDelegate();
15 virtual ~TestBrowserPluginGuestDelegate();
19 bool load_aborted() const { return load_aborted_; }
20 const GURL& load_aborted_url() const { return load_aborted_url_; }
23 // Overridden from BrowserPluginGuestDelegate:
24 virtual void AddMessageToConsole(int32 level,
25 const string16& message,
27 const string16& source_id) OVERRIDE;
28 virtual void Close() OVERRIDE;
29 virtual void GuestProcessGone(base::TerminationStatus status) OVERRIDE;
30 virtual bool HandleKeyboardEvent(
31 const NativeWebKeyboardEvent& event) OVERRIDE;
32 virtual void LoadAbort(bool is_top_level,
34 const std::string& error_type) OVERRIDE;
35 virtual void RendererResponsive() OVERRIDE;
36 virtual void RendererUnresponsive() OVERRIDE;
37 virtual bool RequestPermission(
38 BrowserPluginPermissionType permission_type,
39 const base::DictionaryValue& request_info,
40 const PermissionResponseCallback& callback,
41 bool allowed_by_default) OVERRIDE;
42 virtual void SizeChanged(const gfx::Size& old_size,
43 const gfx::Size& new_size) OVERRIDE;
46 GURL load_aborted_url_;
48 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuestDelegate);
51 } // namespace content
52 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_