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

Unified Diff: src/trusted/plugin/srpc/browser_interface.h

Issue 2981011: Move plugin/srpc contents to the more appropriately named plugin/common.... (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/plugin/socket_address.cc ('k') | src/trusted/plugin/srpc/browser_interface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/srpc/browser_interface.h
===================================================================
--- src/trusted/plugin/srpc/browser_interface.h (revision 2716)
+++ src/trusted/plugin/srpc/browser_interface.h (working copy)
@@ -1,80 +0,0 @@
-/*
- * Copyright 2008 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can
- * be found in the LICENSE file.
- */
-
-
-// Portable interface for browser interaction
-
-#ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_BROWSER_INTERFACE_H_
-#define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_BROWSER_INTERFACE_H_
-
-#include <stdio.h>
-#include <map>
-
-#include "native_client/src/include/nacl_macros.h"
-#include "native_client/src/include/nacl_string.h"
-#include "native_client/src/include/portability.h"
-#include "native_client/src/shared/npruntime/nacl_npapi.h"
-#include "native_client/src/trusted/plugin/api_defines.h"
-
-namespace nacl {
-
-class NPModule;
-
-} // namespace
-
-namespace plugin {
-
-class ScriptableHandle;
-class PortableHandle;
-
-// BrowserInterface represents the interface to the browser from
-// the plugin, independent of whether it is the ActiveX or NPAPI instance.
-// I.e., when the plugin needs to request an alert, it uses these interfaces.
-class BrowserInterface {
- public:
- virtual ~BrowserInterface() { }
-
- // Functions for communication with the browser.
-
- // Convert a string to an identifier.
- virtual uintptr_t StringToIdentifier(const nacl::string& str) = 0;
- // Convert an identifier to a string.
- virtual nacl::string IdentifierToString(uintptr_t ident) = 0;
-
- // Pops up an alert box. Returns false if that failed for any reason.
- virtual bool Alert(InstanceIdentifier instance_id,
- const nacl::string& text) = 0;
-
- // Evaluate a JavaScript string in the browser.
- virtual bool EvalString(InstanceIdentifier plugin_identifier,
- const nacl::string& str) = 0;
-
- // Gets the origin of the current page. Origin is scheme://domain.
- virtual bool GetOrigin(InstanceIdentifier instance_id,
- nacl::string* origin) = 0;
-
- // Creates a browser scriptable handle for a given portable handle.
- // If handle is NULL, returns NULL.
- virtual ScriptableHandle* NewScriptableHandle(PortableHandle* handle) = 0;
-
- // Filename-based version of the function below that takes a char* and size.
- static bool MightBeElfExecutable(const nacl::string& filename,
- nacl::string* error);
-
- // Returns true iff the first |size| bytes of |e_ident_bytes| appear to be
- // a valid ELF file; returns an informative error message otherwise.
- // The check for valid ELF executable is only done looking at the e_ident
- // bytes. Fuller checking is done by the service_runtime.
- static bool MightBeElfExecutable(const char* e_ident_bytes,
- size_t size,
- nacl::string* error);
-
- static const char* kNoError;
-};
-
-} // namespace plugin
-
-#endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_BROWSER_INTERFACE_H_
« no previous file with comments | « src/trusted/plugin/socket_address.cc ('k') | src/trusted/plugin/srpc/browser_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698