summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/private/flash.h
blob: fbc796407193c4bbfe309716fdfa2f63b2cb4e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright (c) 2012 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 PPAPI_CPP_PRIVATE_FLASH_H_
#define PPAPI_CPP_PRIVATE_FLASH_H_

#include <string>

#include "ppapi/c/private/ppb_flash.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"

struct PP_Point;

namespace pp {

class FontDescription_Dev;
class ImageData;
class InstanceHandle;
class Module;
class Point;
class Rect;
class URLRequestInfo;
class Var;

namespace flash {

class Flash {
 public:
  // Returns true if the required interface is available.
  static bool IsAvailable();

  static void SetInstanceAlwaysOnTop(const InstanceHandle& instance,
                                     bool on_top);
  static bool DrawGlyphs(const InstanceHandle& instance,
                         ImageData* image,
                         const FontDescription_Dev& font_desc,
                         uint32_t color,
                         const Point& position,
                         const Rect& clip,
                         const float transformation[3][3],
                         bool allow_subpixel_aa,
                         uint32_t glyph_count,
                         const uint16_t glyph_indices[],
                         const PP_Point glyph_advances[]);
  static Var GetProxyForURL(const InstanceHandle& instance,
                            const std::string& url);
  static int32_t Navigate(const URLRequestInfo& request_info,
                          const std::string& target,
                          bool from_user_action);
  static void RunMessageLoop(const InstanceHandle& instance);
  static void QuitMessageLoop(const InstanceHandle& instance);
  static double GetLocalTimeZoneOffset(const InstanceHandle& instance,
                                       PP_Time t);
  static Var GetCommandLineArgs(Module* module);
  static void PreloadFontWin(const void* logfontw);
  static bool IsRectTopmost(const InstanceHandle& instance, const Rect& rect);
  static void UpdateActivity(const InstanceHandle& instance);
  static Var GetDeviceID(const InstanceHandle& instance);
  static int32_t GetSettingInt(const InstanceHandle& instance,
                               PP_FlashSetting setting);
  static void SetAllowSuddenTermination(const InstanceHandle& instance,
                                        bool allowed);
  // PPB_Flash_Print.
  static void InvokePrinting(const InstanceHandle& instance);
};

}  // namespace flash
}  // namespace pp

#endif  // PPAPI_CPP_PRIVATE_FLASH_H_