OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
7 | 7 |
8 #include "content/public/browser/browser_plugin_guest_delegate.h" | 8 #include "content/public/browser/browser_plugin_guest_delegate.h" |
9 | 9 |
| 10 #include "content/public/common/page_transition_types.h" |
| 11 |
10 namespace content { | 12 namespace content { |
11 | 13 |
| 14 class BrowserPluginGuest; |
| 15 struct Referrer; |
| 16 |
12 class TestBrowserPluginGuestDelegate : public BrowserPluginGuestDelegate { | 17 class TestBrowserPluginGuestDelegate : public BrowserPluginGuestDelegate { |
13 public: | 18 public: |
14 TestBrowserPluginGuestDelegate(); | 19 explicit TestBrowserPluginGuestDelegate(BrowserPluginGuest* guest); |
15 virtual ~TestBrowserPluginGuestDelegate(); | 20 virtual ~TestBrowserPluginGuestDelegate(); |
16 | 21 |
17 void ResetStates(); | 22 void ResetStates(); |
18 | 23 |
19 bool load_aborted() const { return load_aborted_; } | 24 private: |
20 const GURL& load_aborted_url() const { return load_aborted_url_; } | 25 void LoadURLWithParams(const GURL& url, |
| 26 const Referrer& referrer, |
| 27 PageTransition transition_type, |
| 28 WebContents* web_contents); |
21 | 29 |
22 private: | |
23 // Overridden from BrowserPluginGuestDelegate: | 30 // Overridden from BrowserPluginGuestDelegate: |
24 virtual void AddMessageToConsole(int32 level, | 31 virtual void NavigateGuest(const std::string& src) OVERRIDE; |
25 const base::string16& message, | |
26 int32 line_no, | |
27 const base::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, | |
33 const GURL& url, | |
34 const std::string& error_type) OVERRIDE; | |
35 virtual void RendererResponsive() OVERRIDE; | |
36 virtual void RendererUnresponsive() OVERRIDE; | |
37 virtual void 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; | |
44 | 32 |
45 bool load_aborted_; | 33 BrowserPluginGuest* guest_; |
46 GURL load_aborted_url_; | |
47 | 34 |
48 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuestDelegate); | 35 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuestDelegate); |
49 }; | 36 }; |
50 | 37 |
51 } // namespace content | 38 } // namespace content |
52 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 39 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
OLD | NEW |