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

Unified Diff: webkit/plugins/npapi/plugin_stream_url.h

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 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
Index: webkit/plugins/npapi/plugin_stream_url.h
===================================================================
--- webkit/plugins/npapi/plugin_stream_url.h (revision 212369)
+++ webkit/plugins/npapi/plugin_stream_url.h (working copy)
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_
-#define WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_
-
-#include <vector>
-
-#include "url/gurl.h"
-#include "webkit/plugins/npapi/plugin_stream.h"
-#include "webkit/plugins/npapi/webplugin.h"
-
-namespace webkit {
-namespace npapi {
-
-class PluginInstance;
-
-// A NPAPI Stream based on a URL.
-class PluginStreamUrl : public PluginStream,
- public WebPluginResourceClient {
- public:
- // Create a new stream for sending to the plugin by fetching
- // a URL. If notifyNeeded is set, then the plugin will be notified
- // when the stream has been fully sent to the plugin. Initialize
- // must be called before the object is used.
- PluginStreamUrl(unsigned long resource_id,
- const GURL &url,
- PluginInstance *instance,
- bool notify_needed,
- void *notify_data);
-
- // Stop sending the stream to the client.
- // Overrides the base Close so we can cancel our fetching the URL if
- // it is still loading.
- virtual bool Close(NPReason reason) OVERRIDE;
- virtual WebPluginResourceClient* AsResourceClient() OVERRIDE;
- virtual void CancelRequest() OVERRIDE;
-
- // WebPluginResourceClient methods
- virtual void WillSendRequest(const GURL& url, int http_status_code) OVERRIDE;
- virtual void DidReceiveResponse(const std::string& mime_type,
- const std::string& headers,
- uint32 expected_length,
- uint32 last_modified,
- bool request_is_seekable) OVERRIDE;
- virtual void DidReceiveData(const char* buffer,
- int length,
- int data_offset) OVERRIDE;
- virtual void DidFinishLoading(unsigned long resource_id) OVERRIDE;
- virtual void DidFail(unsigned long resource_id) OVERRIDE;
- virtual bool IsMultiByteResponseExpected() OVERRIDE;
- virtual int ResourceId() OVERRIDE;
- virtual void AddRangeRequestResourceId(unsigned long resource_id) OVERRIDE;
-
- protected:
- virtual ~PluginStreamUrl();
-
- private:
- void SetDeferLoading(bool value);
-
- GURL url_;
- unsigned long id_;
- // Ids of additional resources requested via range requests issued on
- // seekable streams.
- std::vector<unsigned long> range_requests_;
-
- DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl);
-};
-
-} // namespace npapi
-} // namespace webkit
-
-#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_

Powered by Google App Engine
This is Rietveld 408576698