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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 virtual WebContents* CreateNewGuestWindow( | 34 virtual WebContents* CreateNewGuestWindow( |
35 const WebContents::CreateParams& create_params); | 35 const WebContents::CreateParams& create_params); |
36 | 36 |
37 // Notification that the embedder has completed attachment. | 37 // Notification that the embedder has completed attachment. |
38 virtual void DidAttach() {} | 38 virtual void DidAttach() {} |
39 | 39 |
40 // Requests the instance ID associated with the delegate. | 40 // Requests the instance ID associated with the delegate. |
41 virtual int GetGuestInstanceID() const; | 41 virtual int GetGuestInstanceID() const; |
42 | 42 |
43 // Notifies that the content size of the guest has changed in autosize mode. | 43 // Notification that the BrowserPlugin has resized. |
44 virtual void SizeChanged(const gfx::Size& old_size, | 44 virtual void ElementSizeChanged(const gfx::Size& old_size, |
45 const gfx::Size& new_size) {} | 45 const gfx::Size& new_size) {} |
| 46 |
| 47 // Notifies that the content size of the guest has changed. |
| 48 // Note: In autosize mode, it si possible that the guest size may not match |
| 49 // the element size. |
| 50 virtual void GuestSizeChanged(const gfx::Size& old_size, |
| 51 const gfx::Size& new_size) {} |
46 | 52 |
47 // Asks the delegate if the given guest can lock the pointer. | 53 // Asks the delegate if the given guest can lock the pointer. |
48 // Invoking the |callback| synchronously is OK. | 54 // Invoking the |callback| synchronously is OK. |
49 virtual void RequestPointerLockPermission( | 55 virtual void RequestPointerLockPermission( |
50 bool user_gesture, | 56 bool user_gesture, |
51 bool last_unlocked_by_target, | 57 bool last_unlocked_by_target, |
52 const base::Callback<void(bool)>& callback) {} | 58 const base::Callback<void(bool)>& callback) {} |
53 | 59 |
54 // Requests that the delegate destroy itself along with its associated | 60 // Requests that the delegate destroy itself along with its associated |
55 // WebContents. | 61 // WebContents. |
56 virtual void Destroy() {} | 62 virtual void Destroy() {} |
57 | 63 |
58 // Registers a |callback| with the delegate that the delegate would call when | 64 // Registers a |callback| with the delegate that the delegate would call when |
59 // it is about to be destroyed. | 65 // it is about to be destroyed. |
60 typedef base::Callback<void()> DestructionCallback; | 66 typedef base::Callback<void()> DestructionCallback; |
61 virtual void RegisterDestructionCallback( | 67 virtual void RegisterDestructionCallback( |
62 const DestructionCallback& callback) {} | 68 const DestructionCallback& callback) {} |
63 }; | 69 }; |
64 | 70 |
65 } // namespace content | 71 } // namespace content |
66 | 72 |
67 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 73 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
OLD | NEW |