]> git.sesse.net Git - casparcg/blob - dependencies64/cef/include/cef_client.h
* Merged html producer and updated to latest CEF version (does not have satisfactory...
[casparcg] / dependencies64 / cef / include / cef_client.h
1 // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 //    * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //    * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // ---------------------------------------------------------------------------
31 //
32 // The contents of this file must follow a specific format in order to
33 // support the CEF translator tool. See the translator.README.txt file in the
34 // tools directory for more information.
35 //
36
37 #ifndef CEF_INCLUDE_CEF_CLIENT_H_
38 #define CEF_INCLUDE_CEF_CLIENT_H_
39 #pragma once
40
41 #include "include/cef_base.h"
42 #include "include/cef_context_menu_handler.h"
43 #include "include/cef_dialog_handler.h"
44 #include "include/cef_display_handler.h"
45 #include "include/cef_download_handler.h"
46 #include "include/cef_drag_handler.h"
47 #include "include/cef_find_handler.h"
48 #include "include/cef_focus_handler.h"
49 #include "include/cef_geolocation_handler.h"
50 #include "include/cef_jsdialog_handler.h"
51 #include "include/cef_keyboard_handler.h"
52 #include "include/cef_life_span_handler.h"
53 #include "include/cef_load_handler.h"
54 #include "include/cef_process_message.h"
55 #include "include/cef_render_handler.h"
56 #include "include/cef_request_handler.h"
57
58 ///
59 // Implement this interface to provide handler implementations.
60 ///
61 /*--cef(source=client,no_debugct_check)--*/
62 class CefClient : public virtual CefBase {
63  public:
64   ///
65   // Return the handler for context menus. If no handler is provided the default
66   // implementation will be used.
67   ///
68   /*--cef()--*/
69   virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() {
70     return NULL;
71   }
72
73   ///
74   // Return the handler for dialogs. If no handler is provided the default
75   // implementation will be used.
76   ///
77   /*--cef()--*/
78   virtual CefRefPtr<CefDialogHandler> GetDialogHandler() {
79     return NULL;
80   }
81
82   ///
83   // Return the handler for browser display state events.
84   ///
85   /*--cef()--*/
86   virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() {
87     return NULL;
88   }
89
90   ///
91   // Return the handler for download events. If no handler is returned downloads
92   // will not be allowed.
93   ///
94   /*--cef()--*/
95   virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() {
96     return NULL;
97   }
98
99   ///
100   // Return the handler for drag events.
101   ///
102   /*--cef()--*/
103   virtual CefRefPtr<CefDragHandler> GetDragHandler() {
104     return NULL;
105   }
106
107   ///
108   // Return the handler for find result events.
109   ///
110   /*--cef()--*/
111   virtual CefRefPtr<CefFindHandler> GetFindHandler() {
112     return NULL;
113   }
114
115   ///
116   // Return the handler for focus events.
117   ///
118   /*--cef()--*/
119   virtual CefRefPtr<CefFocusHandler> GetFocusHandler() {
120     return NULL;
121   }
122
123   ///
124   // Return the handler for geolocation permissions requests. If no handler is
125   // provided geolocation access will be denied by default.
126   ///
127   /*--cef()--*/
128   virtual CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() {
129     return NULL;
130   }
131
132   ///
133   // Return the handler for JavaScript dialogs. If no handler is provided the
134   // default implementation will be used.
135   ///
136   /*--cef()--*/
137   virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {
138     return NULL;
139   }
140
141   ///
142   // Return the handler for keyboard events.
143   ///
144   /*--cef()--*/
145   virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() {
146     return NULL;
147   }
148
149   ///
150   // Return the handler for browser life span events.
151   ///
152   /*--cef()--*/
153   virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() {
154     return NULL;
155   }
156
157   ///
158   // Return the handler for browser load status events.
159   ///
160   /*--cef()--*/
161   virtual CefRefPtr<CefLoadHandler> GetLoadHandler() {
162     return NULL;
163   }
164
165   ///
166   // Return the handler for off-screen rendering events.
167   ///
168   /*--cef()--*/
169   virtual CefRefPtr<CefRenderHandler> GetRenderHandler() {
170     return NULL;
171   }
172
173   ///
174   // Return the handler for browser request events.
175   ///
176   /*--cef()--*/
177   virtual CefRefPtr<CefRequestHandler> GetRequestHandler() {
178     return NULL;
179   }
180
181   ///
182   // Called when a new message is received from a different process. Return true
183   // if the message was handled or false otherwise. Do not keep a reference to
184   // or attempt to access the message outside of this callback.
185   ///
186   /*--cef()--*/
187   virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
188                                         CefProcessId source_process,
189                                         CefRefPtr<CefProcessMessage> message) {
190     return false;
191   }
192 };
193
194 #endif  // CEF_INCLUDE_CEF_CLIENT_H_