1 // Copyright (c) 2010 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 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CLIPBOARD_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CLIPBOARD_API_H_ 7 #pragma once 8 9 #include "chrome/browser/extensions/extension_function.h" 10 11 class RenderViewHost; 12 13 // Base class for clipboard function APIs. 14 class ClipboardFunction : public SyncExtensionFunction { 15 public: 16 virtual bool RunImpl(); 17 virtual bool RunImpl(RenderViewHost* render_view_host) = 0; 18 19 protected: 20 virtual ~ClipboardFunction() {} 21 }; 22 23 class ExecuteCopyClipboardFunction : public ClipboardFunction { 24 public: 25 virtual bool RunImpl(RenderViewHost* render_view_host); 26 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clipboard.executeCopy"); 27 }; 28 29 class ExecuteCutClipboardFunction : public ClipboardFunction { 30 public: 31 virtual bool RunImpl(RenderViewHost* render_view_host); 32 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clipboard.executeCut"); 33 }; 34 35 class ExecutePasteClipboardFunction : public ClipboardFunction { 36 public: 37 virtual bool RunImpl(RenderViewHost* render_view_host); 38 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clipboard.executePaste"); 39 }; 40 41 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLIPBOARD_API_H_ 42