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

Side by Side Diff: chrome/browser/extensions/api/streams_private/streams_private_api.h

Issue 263513004: Forward MIME types to BrowserPlugin when a viewer is specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittests Created 6 years, 6 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 | « no previous file | chrome/browser/extensions/api/streams_private/streams_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 class StreamsPrivateAPI : public BrowserContextKeyedAPI, 24 class StreamsPrivateAPI : public BrowserContextKeyedAPI,
25 public ExtensionRegistryObserver { 25 public ExtensionRegistryObserver {
26 public: 26 public:
27 // Convenience method to get the StreamsPrivateAPI for a BrowserContext. 27 // Convenience method to get the StreamsPrivateAPI for a BrowserContext.
28 static StreamsPrivateAPI* Get(content::BrowserContext* context); 28 static StreamsPrivateAPI* Get(content::BrowserContext* context);
29 29
30 explicit StreamsPrivateAPI(content::BrowserContext* context); 30 explicit StreamsPrivateAPI(content::BrowserContext* context);
31 virtual ~StreamsPrivateAPI(); 31 virtual ~StreamsPrivateAPI();
32 32
33 // Send the onExecuteMimeTypeHandler event to |extension_id|.
34 // |web_contents| is used to determine the tabId where the document is being
35 // opened. The data for the document will be readable from |stream|, and
36 // should be |expected_content_size| bytes long. If the viewer is being opened
37 // in a BrowserPlugin, specify a non-empty |view_id| of the plugin.
33 void ExecuteMimeTypeHandler(const std::string& extension_id, 38 void ExecuteMimeTypeHandler(const std::string& extension_id,
34 content::WebContents* web_contents, 39 content::WebContents* web_contents,
35 scoped_ptr<content::StreamHandle> stream, 40 scoped_ptr<content::StreamHandle> stream,
41 const std::string& view_id,
36 int64 expected_content_size); 42 int64 expected_content_size);
37 43
38 void AbortStream(const std::string& extension_id, 44 void AbortStream(const std::string& extension_id,
39 const GURL& stream_url, 45 const GURL& stream_url,
40 const base::Closure& callback); 46 const base::Closure& callback);
41 47
42 // BrowserContextKeyedAPI implementation. 48 // BrowserContextKeyedAPI implementation.
43 static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance(); 49 static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance();
44 50
45 private: 51 private:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 89
84 private: 90 private:
85 void OnClose(); 91 void OnClose();
86 92
87 std::string stream_url_; 93 std::string stream_url_;
88 }; 94 };
89 95
90 } // namespace extensions 96 } // namespace extensions
91 97
92 #endif // CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ 98 #endif // CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/streams_private/streams_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698