diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 10:34:49 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 10:34:49 +0000 |
commit | 09957592452c75086a523c4f8ae16491ef54673f (patch) | |
tree | a891416ae45509e33a7b51ef4d10cae648dde712 /extensions/renderer/test_extensions_renderer_client.h | |
parent | 5a40d60411da361e5ac216efa90a80a29ebe8b57 (diff) | |
download | chromium_src-09957592452c75086a523c4f8ae16491ef54673f.zip chromium_src-09957592452c75086a523c4f8ae16491ef54673f.tar.gz chromium_src-09957592452c75086a523c4f8ae16491ef54673f.tar.bz2 |
Introduce chrome.shell.createWindow stub API for app_shell
The chrome.app.window.create API has too many Chrome dependencies to be practically extracted from src/chrome. Rather than create an incomplete chrome.app.window API stub just for app_shell, introduce chrome.shell.createWindow which can be used in place of chrome.app.window with a small stub.
* Introduce chrome.shell.createWindow for app_shell.
* Introduce an app_shell_resources target to hold the resource for the chrome.shell custom bindings JS.
* Extend ExtensionsRendererClient to allow an extensions embedder to supply additional custom APIs.
* Modify the Calculator example to use a small chrome.shell polyfill for window creation.
BUG=349042
TEST=browser_tests *Extension*, app_shell --app=<path/to/calculator/app> loads calculator
TBR=isherman@chromium.org for mechanical update of existing ExtensionFunction enum in histograms.xml
Review URL: https://codereview.chromium.org/254473011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267159 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/renderer/test_extensions_renderer_client.h')
-rw-r--r-- | extensions/renderer/test_extensions_renderer_client.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/extensions/renderer/test_extensions_renderer_client.h b/extensions/renderer/test_extensions_renderer_client.h new file mode 100644 index 0000000..a71d1bb --- /dev/null +++ b/extensions/renderer/test_extensions_renderer_client.h @@ -0,0 +1,31 @@ +// Copyright 2014 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_TEST_EXTENSIONS_RENDERER_CLIENT_H_ +#define EXTENSIONS_RENDERER_TEST_EXTENSIONS_RENDERER_CLIENT_H_ + +#include "base/macros.h" +#include "extensions/renderer/extensions_renderer_client.h" + +namespace extensions { + +class TestExtensionsRendererClient : public ExtensionsRendererClient { + public: + TestExtensionsRendererClient(); + virtual ~TestExtensionsRendererClient(); + + // ExtensionsRendererClient implementation. + virtual bool IsIncognitoProcess() const OVERRIDE; + virtual int GetLowestIsolatedWorldId() const OVERRIDE; + virtual void RegisterNativeHandlers(ModuleSystem* module_system, + ScriptContext* context) OVERRIDE; + virtual void PopulateSourceMap(ResourceBundleSourceMap* source_map) OVERRIDE; + + private: + DISALLOW_COPY_AND_ASSIGN(TestExtensionsRendererClient); +}; + +} // namespace extensions + +#endif // EXTENSIONS_RENDERER_TEST_EXTENSIONS_RENDERER_CLIENT_H_ |