From 4462559524df6726acc2400113508f3dc22b3648 Mon Sep 17 00:00:00 2001 From: "brg@chromium.com" Date: Wed, 17 Mar 2010 20:41:58 +0000 Subject: Committing for dcheng@ Original review: http://codereview.chromium.org/882003 Review URL: http://codereview.chromium.org/1042004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41874 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/extensions/extension_clipboard_api.h | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 chrome/browser/extensions/extension_clipboard_api.h (limited to 'chrome/browser/extensions/extension_clipboard_api.h') diff --git a/chrome/browser/extensions/extension_clipboard_api.h b/chrome/browser/extensions/extension_clipboard_api.h new file mode 100644 index 0000000..4789221 --- /dev/null +++ b/chrome/browser/extensions/extension_clipboard_api.h @@ -0,0 +1,37 @@ +// Copyright (c) 2010 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_CLIPBOARD_API_H_ +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_CLIPBOARD_API_H_ + +#include "chrome/browser/extensions/extension_function.h" + +class RenderViewHost; + +// Base class for clipboard function APIs. +class ClipboardFunction : public SyncExtensionFunction { + public: + virtual bool RunImpl(); + virtual bool RunImpl(RenderViewHost* render_view_host) = 0; +}; + +class ExecuteCopyClipboardFunction : public ClipboardFunction { + public: + virtual bool RunImpl(RenderViewHost* render_view_host); + DECLARE_EXTENSION_FUNCTION_NAME("experimental.clipboard.executeCopy"); +}; + +class ExecuteCutClipboardFunction : public ClipboardFunction { + public: + virtual bool RunImpl(RenderViewHost* render_view_host); + DECLARE_EXTENSION_FUNCTION_NAME("experimental.clipboard.executeCut"); +}; + +class ExecutePasteClipboardFunction : public ClipboardFunction { + public: + virtual bool RunImpl(RenderViewHost* render_view_host); + DECLARE_EXTENSION_FUNCTION_NAME("experimental.clipboard.executePaste"); +}; + +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLIPBOARD_API_H_ -- cgit v1.1