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

Side by Side Diff: chrome_frame/npapi_url_request.h

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « chrome_frame/np_proxy_service.cc ('k') | chrome_frame/npapi_url_request.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) 2009 The Chromium 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 CHROME_FRAME_NPAPI_URL_REQUEST_H_
6 #define CHROME_FRAME_NPAPI_URL_REQUEST_H_
7
8 #include "base/platform_thread.h"
9 #include "chrome_frame/plugin_url_request.h"
10 #include "third_party/WebKit/WebCore/bridge/npapi.h"
11
12 class NPAPIUrlRequest : public PluginUrlRequest {
13 public:
14 explicit NPAPIUrlRequest(NPP instance);
15 ~NPAPIUrlRequest();
16
17 virtual bool Start();
18 virtual void Stop();
19 virtual bool Read(int bytes_to_read);
20
21 // Called from NPAPI
22 bool OnStreamCreated(const char* mime_type, NPStream* stream);
23 void OnStreamDestroyed(NPReason reason);
24 int OnWriteReady();
25 int OnWrite(void* buffer, int len);
26
27 // Thread unsafe implementation of ref counting, since
28 // this will be called on the plugin UI thread only.
29 virtual unsigned long API_CALL AddRef();
30 virtual unsigned long API_CALL Release();
31
32 private:
33 unsigned long ref_count_;
34 NPP instance_;
35 NPStream* stream_;
36 size_t pending_read_size_;
37 URLRequestStatus status_;
38
39 PlatformThreadId thread_;
40 static int instance_count_;
41 DISALLOW_COPY_AND_ASSIGN(NPAPIUrlRequest);
42 };
43
44 #endif // CHROME_FRAME_NPAPI_URL_REQUEST_H_
45
OLDNEW
« no previous file with comments | « chrome_frame/np_proxy_service.cc ('k') | chrome_frame/npapi_url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698