Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: ppapi/cpp/private/flash_clipboard.h

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/private/flash.cc ('k') | ppapi/cpp/private/flash_clipboard.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_ 5 #ifndef PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_
6 #define PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_ 6 #define PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ppapi/c/private/ppb_flash_clipboard.h" 11 #include "ppapi/c/private/ppb_flash_clipboard.h"
12 #include "ppapi/cpp/var.h" 12 #include "ppapi/cpp/var.h"
13 13
14 namespace pp { 14 namespace pp {
15 15
16 class Instance; 16 class InstanceHandle;
17 17
18 namespace flash { 18 namespace flash {
19 19
20 class Clipboard { 20 class Clipboard {
21 public: 21 public:
22 // Returns true if the required interface is available. 22 // Returns true if the required interface is available.
23 static bool IsAvailable(); 23 static bool IsAvailable();
24 24
25 // Returns true if the given format is available from the given clipboard. 25 // Returns true if the given format is available from the given clipboard.
26 static bool IsFormatAvailable(Instance* instance, 26 static bool IsFormatAvailable(const InstanceHandle& instance,
27 PP_Flash_Clipboard_Type clipboard_type, 27 PP_Flash_Clipboard_Type clipboard_type,
28 PP_Flash_Clipboard_Format format); 28 PP_Flash_Clipboard_Format format);
29 29
30 // Returns true on success, in which case |out| will be filled with 30 // Returns true on success, in which case |out| will be filled with
31 // data read from the given clipboard in the given format. 31 // data read from the given clipboard in the given format.
32 static bool ReadData(Instance* instance, 32 static bool ReadData(const InstanceHandle& instance,
33 PP_Flash_Clipboard_Type clipboard_type, 33 PP_Flash_Clipboard_Type clipboard_type,
34 PP_Flash_Clipboard_Format clipboard_format, 34 PP_Flash_Clipboard_Format clipboard_format,
35 Var* out); 35 Var* out);
36 36
37 // Returns true on success in which case all of |data| will be written to 37 // Returns true on success in which case all of |data| will be written to
38 // the clipboard. Otherwise nothing will be written. 38 // the clipboard. Otherwise nothing will be written.
39 static bool WriteData(Instance* instance, 39 static bool WriteData(const InstanceHandle& instance,
40 PP_Flash_Clipboard_Type clipboard_type, 40 PP_Flash_Clipboard_Type clipboard_type,
41 const std::vector<PP_Flash_Clipboard_Format>& formats, 41 const std::vector<PP_Flash_Clipboard_Format>& formats,
42 const std::vector<Var>& data_items); 42 const std::vector<Var>& data_items);
43 }; 43 };
44 44
45 } // namespace flash 45 } // namespace flash
46 } // namespace pp 46 } // namespace pp
47 47
48 #endif // PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_ 48 #endif // PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/private/flash.cc ('k') | ppapi/cpp/private/flash_clipboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698