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

Side by Side Diff: experimental/c_salt/instance.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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
« no previous file with comments | « experimental/c_salt/instance.h ('k') | experimental/c_salt/integration_tests/README » ('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 2010 The Ginsu Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 // TODO(c_salt authors): Make this API agnostic. Also maybe don't force it to
6 // be a ScriptableNativeObjectInterface.
7
8 #include "c_salt/instance.h"
9
10 #include "c_salt/npapi/browser_binding.h"
11
12 namespace c_salt {
13
14 Instance::~Instance() {
15 set_is_loaded(false);
16 }
17
18 void Instance::InitializeMethods(ScriptingBridge* bridge) {
19 }
20
21 void Instance::InitializeProperties(ScriptingBridge* bridge) {
22 }
23
24 bool Instance::InstanceDidLoad(int width, int height) {
25 return true;
26 }
27
28 void Instance::WindowDidChangeSize(int width, int height) {
29 }
30
31 bool Instance::ReceiveEvent(const NPPepperEvent& event) {
32 return false;
33 }
34
35 void Instance::CreateScriptingBridgeForObject(
36 SharedScriptableNativeObject native_object) {
37 // Create the browser_binding. This is a synchronous call to the Browser.
38 c_salt::npapi::BrowserBinding* browser_binding =
39 c_salt::npapi::BrowserBinding::CreateBrowserBinding(*this);
40 if (browser_binding) {
41 SharedScriptingBridge bridge(browser_binding->scripting_bridge());
42 // Tell the ScriptingBridge the object for which it is the bridge.
43 bridge->set_native_object(native_object);
44 // And initialize the native object with the bridge. This initializes
45 // methods and properties and sets the ScriptableNativeObject up with a weak
46 // reference back to the ScriptingBridge.
47 native_object->Initialize(bridge);
48 }
49 }
50
51 } // namespace c_salt
OLDNEW
« no previous file with comments | « experimental/c_salt/instance.h ('k') | experimental/c_salt/integration_tests/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698