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" |
(...skipping 11 matching lines...) Expand all Loading... |
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 // Requests setting the zoom level to the provided |zoom_level|. | 29 // Requests setting the zoom level to the provided |zoom_level|. |
30 virtual void SetZoom(double zoom_factor) {} | 30 virtual void SetZoom(double zoom_factor) {} |
31 | 31 |
32 virtual bool IsDragAndDropEnabled(); | |
33 | |
34 // Notifies that the content size of the guest has changed in autosize mode. | 32 // Notifies that the content size of the guest has changed in autosize mode. |
35 virtual void SizeChanged(const gfx::Size& old_size, | 33 virtual void SizeChanged(const gfx::Size& old_size, |
36 const gfx::Size& new_size) {} | 34 const gfx::Size& new_size) {} |
37 | 35 |
38 // Asks the delegate if the given guest can lock the pointer. | 36 // Asks the delegate if the given guest can lock the pointer. |
39 // Invoking the |callback| synchronously is OK. | 37 // Invoking the |callback| synchronously is OK. |
40 virtual void RequestPointerLockPermission( | 38 virtual void RequestPointerLockPermission( |
41 bool user_gesture, | 39 bool user_gesture, |
42 bool last_unlocked_by_target, | 40 bool last_unlocked_by_target, |
43 const base::Callback<void(bool)>& callback) {} | 41 const base::Callback<void(bool)>& callback) {} |
44 | 42 |
45 // Request navigating the guest to the provided |src| URL. | 43 // Request navigating the guest to the provided |src| URL. |
46 virtual void NavigateGuest(const std::string& src) {} | 44 virtual void NavigateGuest(const std::string& src) {} |
47 | 45 |
48 // Requests that the delegate destroy itself along with its associated | 46 // Requests that the delegate destroy itself along with its associated |
49 // WebContents. | 47 // WebContents. |
50 virtual void Destroy() {} | 48 virtual void Destroy() {} |
51 | 49 |
52 // Registers a |callback| with the delegate that the delegate would call when | 50 // Registers a |callback| with the delegate that the delegate would call when |
53 // it is about to be destroyed. | 51 // it is about to be destroyed. |
54 typedef base::Callback<void()> DestructionCallback; | 52 typedef base::Callback<void()> DestructionCallback; |
55 virtual void RegisterDestructionCallback( | 53 virtual void RegisterDestructionCallback( |
56 const DestructionCallback& callback) {} | 54 const DestructionCallback& callback) {} |
57 }; | 55 }; |
58 | 56 |
59 } // namespace content | 57 } // namespace content |
60 | 58 |
61 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 59 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
OLD | NEW |