Pepper_42_C++_interfaces
extension_system_samsung_wrt.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics, Visual Display Division.
3  * All Rights Reserved.
4  *
5  * @author Marcin Kazmierczak <m.kazmiercz2@samsung.com>
6  *
7  * Use of this source code is governed by a BSD-style license that can be
8  * found in the Chromium-LICENSE file.
9  */
10 
11 #ifndef PPAPI_CPP_SAMSUNG_EXTENSION_SYSTEM_SAMSUNG_WRT_H_
12 #define PPAPI_CPP_SAMSUNG_EXTENSION_SYSTEM_SAMSUNG_WRT_H_
13 
14 #include <map>
15 
16 #include "ppapi/cpp/samsung/extension_system_samsung.h"
17 
18 /// @file
19 /// This file defines APIs related to extension system provided by the WRT.
20 
21 namespace pp {
22 
24  public:
25  /// A constructor for creating a <code>ExtensionSystemSamsung</code>.
26  ///
27  /// @param[in] instance The instance with which this resource will be
28  /// associated.
29  explicit ExtensionSystemSamsungWRT(const InstanceHandle& instance);
30 
31  /// Destructor.
33 
34  /// IsValid() returns true if this object is valid in this context, i.e.
35  /// current extension system is WRT.
36  bool IsValid() const;
37 
38  /// CheckPrivilege() returns true if the current extension has given
39  /// privilege, false otherwise.
40  bool CheckPrivilege(const pp::Var& privilege);
41 
42  /// GetWindowId() returns the X window Id for the current window.
43  int32_t GetWindowId();
44 
45  private:
46  std::map<std::string, bool> privileges_result_;
47 };
48 
49 } // namespace pp
50 
51 #endif // PPAPI_CPP_SAMSUNG_EXTENSION_SYSTEM_SAMSUNG_WRT_H_
int32_t GetWindowId()
GetWindowId() returns the X window Id for the current window.
~ExtensionSystemSamsungWRT()
Destructor.
bool CheckPrivilege(const pp::Var &privilege)
ExtensionSystemSamsungWRT(const InstanceHandle &instance)
A generic type used for passing data types between the module and the page.
Definition: var.h:21