[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
hashimoto | f784afd | 2014-09-05 02:38:31 | [diff] [blame] | 5 | #ifndef EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_ |
6 | #define EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_ | ||||
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 7 | |
[email protected] | bcd9580f | 2014-04-17 19:17:59 | [diff] [blame] | 8 | #include "extensions/renderer/object_backed_native_handler.h" |
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 9 | |
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 10 | namespace extensions { |
[email protected] | 8fe74bf | 2012-08-07 21:08:42 | [diff] [blame] | 11 | class Dispatcher; |
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 12 | |
[email protected] | f0233ff | 2012-07-20 20:14:50 | [diff] [blame] | 13 | // Implements custom bindings for the app.window API. |
[email protected] | bcd9580f | 2014-04-17 19:17:59 | [diff] [blame] | 14 | class AppWindowCustomBindings : public ObjectBackedNativeHandler { |
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 15 | public: |
[email protected] | bcd9580f | 2014-04-17 19:17:59 | [diff] [blame] | 16 | AppWindowCustomBindings(Dispatcher* dispatcher, ScriptContext* context); |
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 17 | |
18 | private: | ||||
[email protected] | d8c5fbb | 2013-06-14 11:35:25 | [diff] [blame] | 19 | void GetView(const v8::FunctionCallbackInfo<v8::Value>& args); |
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 20 | |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 21 | // Return string containing the HTML <template> for the <window-controls> |
22 | // custom element. | ||||
23 | void GetWindowControlsHtmlTemplate( | ||||
24 | const v8::FunctionCallbackInfo<v8::Value>& args); | ||||
25 | |||||
[email protected] | bcd9580f | 2014-04-17 19:17:59 | [diff] [blame] | 26 | // Dispatcher handle. Not owned. |
27 | Dispatcher* dispatcher_; | ||||
28 | |||||
[email protected] | 1eea309 | 2012-05-25 04:12:18 | [diff] [blame] | 29 | DISALLOW_COPY_AND_ASSIGN(AppWindowCustomBindings); |
30 | }; | ||||
31 | |||||
32 | } // namespace extensions | ||||
33 | |||||
hashimoto | f784afd | 2014-09-05 02:38:31 | [diff] [blame] | 34 | #endif // EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_ |