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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual void GuestSizeChanged(const gfx::Size& old_size, | 50 virtual void GuestSizeChanged(const gfx::Size& old_size, |
51 const gfx::Size& new_size) {} | 51 const gfx::Size& new_size) {} |
52 | 52 |
53 // Asks the delegate if the given guest can lock the pointer. | 53 // Asks the delegate if the given guest can lock the pointer. |
54 // Invoking the |callback| synchronously is OK. | 54 // Invoking the |callback| synchronously is OK. |
55 virtual void RequestPointerLockPermission( | 55 virtual void RequestPointerLockPermission( |
56 bool user_gesture, | 56 bool user_gesture, |
57 bool last_unlocked_by_target, | 57 bool last_unlocked_by_target, |
58 const base::Callback<void(bool)>& callback) {} | 58 const base::Callback<void(bool)>& callback) {} |
59 | 59 |
60 // Requests that the delegate destroy itself along with its associated | |
61 // WebContents. | |
62 virtual void Destroy() {} | |
63 | |
64 // Registers a |callback| with the delegate that the delegate would call when | 60 // Registers a |callback| with the delegate that the delegate would call when |
65 // it is about to be destroyed. | 61 // it is about to be destroyed. |
66 typedef base::Callback<void()> DestructionCallback; | 62 typedef base::Callback<void()> DestructionCallback; |
67 virtual void RegisterDestructionCallback( | 63 virtual void RegisterDestructionCallback( |
68 const DestructionCallback& callback) {} | 64 const DestructionCallback& callback) {} |
69 }; | 65 }; |
70 | 66 |
71 } // namespace content | 67 } // namespace content |
72 | 68 |
73 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 69 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
OLD | NEW |