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

Unified Diff: content/child/npapi/npobject_stub.h

Issue 1483733002: Remove support for NPObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 | « content/child/npapi/npobject_proxy.cc ('k') | content/child/npapi/npobject_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/npapi/npobject_stub.h
diff --git a/content/child/npapi/npobject_stub.h b/content/child/npapi/npobject_stub.h
deleted file mode 100644
index 81cec4287fa24321b51c36f627980176cf9cf8f6..0000000000000000000000000000000000000000
--- a/content/child/npapi/npobject_stub.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// A class that receives IPC messages from an NPObjectProxy and calls the real
-// NPObject.
-
-#ifndef CONTENT_CHILD_NPAPI_NPOBJECT_STUB_H_
-#define CONTENT_CHILD_NPAPI_NPOBJECT_STUB_H_
-
-#include <vector>
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "content/child/npapi/npobject_base.h"
-#include "ipc/ipc_listener.h"
-#include "ipc/ipc_sender.h"
-#include "url/gurl.h"
-
-struct NPObject;
-
-namespace content {
-class NPChannelBase;
-struct NPIdentifier_Param;
-struct NPVariant_Param;
-
-// This wraps an NPObject and converts IPC messages from NPObjectProxy to calls
-// to the object. The results are marshalled back. See npobject_proxy.h for
-// more information.
-class NPObjectStub : public IPC::Listener,
- public IPC::Sender,
- public base::SupportsWeakPtr<NPObjectStub>,
- public NPObjectBase {
- public:
- NPObjectStub(NPObject* npobject,
- NPChannelBase* channel,
- int route_id,
- int render_view_id,
- const GURL& page_url);
- ~NPObjectStub() override;
-
- // Schedules tear-down of this stub. The underlying NPObject reference is
- // released, and further invokations from the IPC channel will fail once this
- // call has returned. Deletion of the stub is deferred to the main loop, in
- // case it is touched as the stack unwinds. DeleteSoon() is safe to call
- // more than once, until control returns to the main loop.
- void DeleteSoon();
-
- // IPC::Sender implementation:
- bool Send(IPC::Message* msg) override;
-
- // NPObjectBase implementation.
- NPObject* GetUnderlyingNPObject() override;
- IPC::Listener* GetChannelListener() override;
-
- private:
- // IPC::Listener implementation:
- bool OnMessageReceived(const IPC::Message& message) override;
- void OnChannelError() override;
-
- // message handlers
- void OnRelease(IPC::Message* reply_msg);
- void OnHasMethod(const NPIdentifier_Param& name,
- bool* result);
- void OnInvoke(bool is_default,
- const NPIdentifier_Param& method,
- const std::vector<NPVariant_Param>& args,
- IPC::Message* reply_msg);
- void OnHasProperty(const NPIdentifier_Param& name,
- bool* result);
- void OnGetProperty(const NPIdentifier_Param& name,
- NPVariant_Param* property,
- bool* result);
- void OnSetProperty(const NPIdentifier_Param& name,
- const NPVariant_Param& property,
- IPC::Message* reply_msg);
- void OnRemoveProperty(const NPIdentifier_Param& name,
- bool* result);
- void OnInvalidate();
- void OnEnumeration(std::vector<NPIdentifier_Param>* value,
- bool* result);
- void OnConstruct(const std::vector<NPVariant_Param>& args,
- IPC::Message* reply_msg);
- void OnEvaluate(const std::string& script, bool popups_allowed,
- IPC::Message* reply_msg);
-
- private:
- NPObject* npobject_;
- scoped_refptr<NPChannelBase> channel_;
- int route_id_;
- int render_view_id_;
-
- // The url of the main frame hosting the plugin.
- GURL page_url_;
-};
-
-} // namespace content
-
-#endif // CONTENT_CHILD_NPAPI_NPOBJECT_STUB_H_
« no previous file with comments | « content/child/npapi/npobject_proxy.cc ('k') | content/child/npapi/npobject_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698