| 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 base { |
| 13 class DictionaryValue; |
| 14 } // namespace base |
| 15 |
| 12 namespace gfx { | 16 namespace gfx { |
| 13 class Size; | 17 class Size; |
| 14 } // namespace gfx | 18 } // namespace gfx |
| 15 | 19 |
| 16 namespace content { | 20 namespace content { |
| 17 | 21 |
| 18 class WebContents; | 22 class WebContents; |
| 19 | 23 |
| 20 // Objects implement this interface to get notified about changes in the guest | 24 // Objects implement this interface to get notified about changes in the guest |
| 21 // WebContents and to provide necessary functionality. | 25 // WebContents and to provide necessary functionality. |
| 22 class CONTENT_EXPORT BrowserPluginGuestDelegate { | 26 class CONTENT_EXPORT BrowserPluginGuestDelegate { |
| 23 public: | 27 public: |
| 24 virtual ~BrowserPluginGuestDelegate() {} | 28 virtual ~BrowserPluginGuestDelegate() {} |
| 25 | 29 |
| 26 // Notification that the embedder has completed attachment. | 30 // Notification that the embedder has completed attachment. |
| 27 virtual void DidAttach() {} | 31 virtual void DidAttach(const base::DictionaryValue& extra_params) {} |
| 28 | 32 |
| 29 // Informs the delegate that the guest render process is gone. |status| | 33 // Informs the delegate that the guest render process is gone. |status| |
| 30 // indicates whether the guest was killed, crashed, or was terminated | 34 // indicates whether the guest was killed, crashed, or was terminated |
| 31 // gracefully. | 35 // gracefully. |
| 32 // TODO(fsamuel): Delete this once BrowserPluginGuest is no longer a | 36 // TODO(fsamuel): Delete this once BrowserPluginGuest is no longer a |
| 33 // WebContentsDelegate. | 37 // WebContentsDelegate. |
| 34 virtual void GuestProcessGone(base::TerminationStatus status) {} | 38 virtual void GuestProcessGone(base::TerminationStatus status) {} |
| 35 | 39 |
| 36 // Informs the delegate that the embedder has been destroyed. | 40 // Informs the delegate that the embedder has been destroyed. |
| 37 virtual void EmbedderDestroyed() {} | 41 virtual void EmbedderDestroyed() {} |
| (...skipping 24 matching lines...) Expand all Loading... |
| 62 // Registers a |callback| with the delegate that the delegate would call when | 66 // Registers a |callback| with the delegate that the delegate would call when |
| 63 // it is about to be destroyed. | 67 // it is about to be destroyed. |
| 64 typedef base::Callback<void(WebContents*)> DestructionCallback; | 68 typedef base::Callback<void(WebContents*)> DestructionCallback; |
| 65 virtual void RegisterDestructionCallback( | 69 virtual void RegisterDestructionCallback( |
| 66 const DestructionCallback& callback) {} | 70 const DestructionCallback& callback) {} |
| 67 }; | 71 }; |
| 68 | 72 |
| 69 } // namespace content | 73 } // namespace content |
| 70 | 74 |
| 71 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 75 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
| OLD | NEW |