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_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Size; | 13 class Size; |
14 } // namespace gfx | 14 } // namespace gfx |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class WebContents; | 18 class WebContents; |
19 | 19 |
20 // Objects implement this interface to get notified about changes in the guest | 20 // Objects implement this interface to get notified about changes in the guest |
21 // WebContents and to provide necessary functionality. | 21 // WebContents and to provide necessary functionality. |
22 class CONTENT_EXPORT BrowserPluginGuestDelegate { | 22 class CONTENT_EXPORT BrowserPluginGuestDelegate { |
23 public: | 23 public: |
24 virtual ~BrowserPluginGuestDelegate() {} | 24 virtual ~BrowserPluginGuestDelegate() {} |
25 | 25 |
26 // Notification that the embedder has completed attachment. | 26 // Notification that the embedder has completed attachment. |
27 virtual void DidAttach() {} | 27 virtual void DidAttach() {} |
28 | 28 |
29 // Informs the delegate that the guest render process is gone. |status| | |
30 // indicates whether the guest was killed, crashed, or was terminated | |
31 // gracefully. | |
32 // TODO(fsamuel): Delete this once BrowserPluginGuest is no longer a | |
33 // WebContentsDelegate. | |
34 virtual void GuestProcessGone(base::TerminationStatus status) {} | |
35 | |
36 // Informs the delegate that the embedder has been destroyed. | 29 // Informs the delegate that the embedder has been destroyed. |
37 virtual void EmbedderDestroyed() {} | 30 virtual void EmbedderDestroyed() {} |
38 | 31 |
39 // Requests setting the zoom level to the provided |zoom_level|. | 32 // Requests setting the zoom level to the provided |zoom_level|. |
40 virtual void SetZoom(double zoom_factor) {} | 33 virtual void SetZoom(double zoom_factor) {} |
41 | 34 |
42 virtual bool IsDragAndDropEnabled(); | 35 virtual bool IsDragAndDropEnabled(); |
43 | 36 |
44 // Notifies that the content size of the guest has changed in autosize mode. | 37 // Notifies that the content size of the guest has changed in autosize mode. |
45 virtual void SizeChanged(const gfx::Size& old_size, | 38 virtual void SizeChanged(const gfx::Size& old_size, |
(...skipping 16 matching lines...) Expand all Loading... |
62 // Registers a |callback| with the delegate that the delegate would call when | 55 // Registers a |callback| with the delegate that the delegate would call when |
63 // it is about to be destroyed. | 56 // it is about to be destroyed. |
64 typedef base::Callback<void(WebContents*)> DestructionCallback; | 57 typedef base::Callback<void(WebContents*)> DestructionCallback; |
65 virtual void RegisterDestructionCallback( | 58 virtual void RegisterDestructionCallback( |
66 const DestructionCallback& callback) {} | 59 const DestructionCallback& callback) {} |
67 }; | 60 }; |
68 | 61 |
69 } // namespace content | 62 } // namespace content |
70 | 63 |
71 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 64 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
OLD | NEW |