diff options
author | hashimoto <hashimoto@chromium.org> | 2014-09-04 19:38:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-05 02:41:17 +0000 |
commit | f784afd4de115dba788b0adc7034a15846765ff5 (patch) | |
tree | 75117182c4981f46f725cafe2d894f626b2aa71e /extensions/renderer/app_window_custom_bindings.h | |
parent | 81145970e2b1c0ceff32af1de3239c48cb4b1d7e (diff) | |
download | chromium_src-f784afd4de115dba788b0adc7034a15846765ff5.zip chromium_src-f784afd4de115dba788b0adc7034a15846765ff5.tar.gz chromium_src-f784afd4de115dba788b0adc7034a15846765ff5.tar.bz2 |
Move app.window API implementation to extensions
Move files:
-Move chrome/browser/extensions/api/app_window/* to extensions/browser.
-Move app_window.idl, app_window_custom_bindings.{cc,h}, app_window_custom_bindings.js to extensions.
-Move window_controls.js and window_controls_template.html to extensions.
Move switches and code:
- Move kEnableAppWindowControls switch to extensions/common/switches.h.
- Move dummy WebContentsModalDialogManager::CreateNativeWebModalManager implementation from athena's web_contents_view_delegate_factory_impl.cc to a new file shell_web_contents_modal_dialog_manager.cc.
Fix dispatchers:
- Move code from chrome_extensions_dispatcher_delegate.cc to extensions/renderer/dispatcher.cc
BUG=387288
Review URL: https://codereview.chromium.org/534163002
Cr-Commit-Position: refs/heads/master@{#293409}
Diffstat (limited to 'extensions/renderer/app_window_custom_bindings.h')
-rw-r--r-- | extensions/renderer/app_window_custom_bindings.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/extensions/renderer/app_window_custom_bindings.h b/extensions/renderer/app_window_custom_bindings.h new file mode 100644 index 0000000..04f7194 --- /dev/null +++ b/extensions/renderer/app_window_custom_bindings.h @@ -0,0 +1,34 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_ +#define EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_ + +#include "extensions/renderer/object_backed_native_handler.h" + +namespace extensions { +class Dispatcher; + +// Implements custom bindings for the app.window API. +class AppWindowCustomBindings : public ObjectBackedNativeHandler { + public: + AppWindowCustomBindings(Dispatcher* dispatcher, ScriptContext* context); + + private: + void GetView(const v8::FunctionCallbackInfo<v8::Value>& args); + + // Return string containing the HTML <template> for the <window-controls> + // custom element. + void GetWindowControlsHtmlTemplate( + const v8::FunctionCallbackInfo<v8::Value>& args); + + // Dispatcher handle. Not owned. + Dispatcher* dispatcher_; + + DISALLOW_COPY_AND_ASSIGN(AppWindowCustomBindings); +}; + +} // namespace extensions + +#endif // EXTENSIONS_RENDERER_APP_WINDOW_CUSTOM_BINDINGS_H_ |