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

Side by Side Diff: tests/fake_browser_ppapi/fake_instance.h

Issue 7292002: Remove plugin connection to PPAPI scriptable objects (var deprecated). Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 5 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 | « tests/fake_browser_ppapi/fake_host.cc ('k') | tests/fake_browser_ppapi/fake_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client 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 NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_INSTANCE_H_
6 #define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_INSTANCE_H_
7
8 #include "native_client/src/include/nacl_macros.h"
9 #include "ppapi/c/pp_module.h"
10 #include "ppapi/c/ppb_instance.h"
11
12 struct PPB_Instance_Private;
13
14 namespace fake_browser_ppapi {
15
16 class FakeWindow;
17 class Host;
18
19 // Implements the PPB_Instance interface.
20 class Instance {
21 public:
22 // You must call set_window to complete initialization.
23 Instance() : instance_id_(0), window_(NULL) {}
24 virtual ~Instance() {}
25
26 void set_window(FakeWindow* window) { window_ = window; }
27
28 void set_instance_id(PP_Instance instance_id) { instance_id_ = instance_id; }
29 PP_Instance instance_id() const { return instance_id_; }
30
31 // The bindings for the methods invoked by the PPAPI interface.
32 virtual PP_Var GetWindowObject();
33 virtual PP_Var GetOwnerElementObject();
34 virtual bool BindGraphics(PP_Resource device);
35 virtual bool IsFullFrame();
36 virtual PP_Var ExecuteScript(PP_Var script,
37 PP_Var* exception);
38 static const PPB_Instance* GetInterface();
39 static const PPB_Instance_Private* GetPrivateInterface();
40 static Instance* Invalid() { return &kInvalidInstance; }
41 private:
42 static Instance kInvalidInstance;
43 PP_Instance instance_id_;
44 FakeWindow* window_;
45 NACL_DISALLOW_COPY_AND_ASSIGN(Instance);
46 };
47
48 // These are made global so that C API functions can access them from any file.
49 // To be implemented by main.cc.
50 PP_Instance TrackInstance(Instance* instance);
51 // Returns Instance::Invalid() on error.
52 Instance* GetInstance(PP_Instance instance_id);
53
54 } // namespace fake_browser_ppapi
55
56 #endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_INSTANCE_H_
OLDNEW
« no previous file with comments | « tests/fake_browser_ppapi/fake_host.cc ('k') | tests/fake_browser_ppapi/fake_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698