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
3// found in the LICENSE file.
4
5#ifndef PPAPI_PROXY_SERIALIZED_FLASH_MENU_H_
6#define PPAPI_PROXY_SERIALIZED_FLASH_MENU_H_
7
8#include <string>
9#include <vector>
10
11#include "base/basictypes.h"
12#include "ppapi/proxy/ppapi_proxy_export.h"
13
14class PickleIterator;
15
16struct PP_Flash_Menu;
17
18namespace IPC {
19class Message;
20}
21
22namespace ppapi {
23namespace proxy {
24
25class PPAPI_PROXY_EXPORT SerializedFlashMenu {
26 public:
27  SerializedFlashMenu();
28  ~SerializedFlashMenu();
29
30  bool SetPPMenu(const PP_Flash_Menu* menu);
31
32  const PP_Flash_Menu* pp_menu() const { return pp_menu_; }
33
34  void WriteToMessage(IPC::Message* m) const;
35  bool ReadFromMessage(const IPC::Message* m, PickleIterator* iter);
36
37 private:
38  const PP_Flash_Menu* pp_menu_;
39  bool own_menu_;
40  DISALLOW_COPY_AND_ASSIGN(SerializedFlashMenu);
41};
42
43}  // namespace proxy
44}  // namespace ppapi
45
46#endif  // PPAPI_PROXY_SERIALIZED_FLASH_MENU_H_
47