Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / extensions / browser / api / guest_view / guest_view_internal_api.h
1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_GUEST_VIEW_GUEST_VIEW_INTERNAL_API_H_
6 #define EXTENSIONS_BROWSER_API_GUEST_VIEW_GUEST_VIEW_INTERNAL_API_H_
7
8 #include "extensions/browser/extension_function.h"
9
10 namespace extensions {
11
12 class GuestViewInternalCreateGuestFunction : public AsyncExtensionFunction {
13  public:
14   DECLARE_EXTENSION_FUNCTION("guestViewInternal.createGuest",
15                              GUESTVIEWINTERNAL_CREATEGUEST);
16   GuestViewInternalCreateGuestFunction();
17
18  protected:
19   ~GuestViewInternalCreateGuestFunction() override {}
20   bool RunAsync() final;
21
22  private:
23   void CreateGuestCallback(content::WebContents* guest_web_contents);
24   DISALLOW_COPY_AND_ASSIGN(GuestViewInternalCreateGuestFunction);
25 };
26
27 class GuestViewInternalDestroyGuestFunction : public AsyncExtensionFunction {
28  public:
29   DECLARE_EXTENSION_FUNCTION("guestViewInternal.destroyGuest",
30                              GUESTVIEWINTERNAL_DESTROYGUEST);
31   GuestViewInternalDestroyGuestFunction();
32
33  protected:
34   ~GuestViewInternalDestroyGuestFunction() override;
35   bool RunAsync() final;
36
37  private:
38   void DestroyGuestCallback(content::WebContents* guest_web_contents);
39   DISALLOW_COPY_AND_ASSIGN(GuestViewInternalDestroyGuestFunction);
40 };
41
42 class GuestViewInternalSetAutoSizeFunction : public AsyncExtensionFunction {
43  public:
44   DECLARE_EXTENSION_FUNCTION("guestViewInternal.setAutoSize",
45                              GUESTVIEWINTERNAL_SETAUTOSIZE);
46
47   GuestViewInternalSetAutoSizeFunction();
48
49  protected:
50   ~GuestViewInternalSetAutoSizeFunction() override;
51   bool RunAsync() final;
52
53  private:
54   DISALLOW_COPY_AND_ASSIGN(GuestViewInternalSetAutoSizeFunction);
55 };
56
57 }  // namespace extensions
58
59 #endif  // EXTENSIONS_BROWSER_API_GUEST_VIEW_GUEST_VIEW_INTERNAL_API_H_