OLD | NEW |
---|---|
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 21 matching lines...) Expand all Loading... | |
32 | 32 |
33 explicit StreamsPrivateAPI(content::BrowserContext* context); | 33 explicit StreamsPrivateAPI(content::BrowserContext* context); |
34 ~StreamsPrivateAPI() override; | 34 ~StreamsPrivateAPI() override; |
35 | 35 |
36 // Send the onExecuteMimeTypeHandler event to |extension_id|. | 36 // Send the onExecuteMimeTypeHandler event to |extension_id|. |
37 // |web_contents| is used to determine the tabId where the document is being | 37 // |web_contents| is used to determine the tabId where the document is being |
38 // opened. The data for the document will be readable from |stream|, and | 38 // opened. The data for the document will be readable from |stream|, and |
39 // should be |expected_content_size| bytes long. If the viewer is being opened | 39 // should be |expected_content_size| bytes long. If the viewer is being opened |
40 // in a BrowserPlugin, specify a non-empty |view_id| of the plugin. |embedded| | 40 // in a BrowserPlugin, specify a non-empty |view_id| of the plugin. |embedded| |
41 // should be set to whether the document is embedded within another document. | 41 // should be set to whether the document is embedded within another document. |
42 // TODO(ananta) | |
43 // Remove the |render_process_id| and |render_frame_id| parameters when | |
44 // PlzNavigate ships. | |
jam
2016/09/17 00:10:07
is this true? i.e. we'll still need them for the n
ananta
2016/09/17 00:23:27
Thanks. Changed the comment
ananta
2016/09/17 02:43:39
I debugged the pdf case inside an iframe. The rend
| |
42 void ExecuteMimeTypeHandler(const std::string& extension_id, | 45 void ExecuteMimeTypeHandler(const std::string& extension_id, |
43 content::WebContents* web_contents, | 46 content::WebContents* web_contents, |
44 std::unique_ptr<content::StreamInfo> stream, | 47 std::unique_ptr<content::StreamInfo> stream, |
45 const std::string& view_id, | 48 const std::string& view_id, |
46 int64_t expected_content_size, | 49 int64_t expected_content_size, |
47 bool embedded, | 50 bool embedded, |
51 int frame_tree_node_id, | |
48 int render_process_id, | 52 int render_process_id, |
49 int render_frame_id); | 53 int render_frame_id); |
50 | 54 |
51 void AbortStream(const std::string& extension_id, | 55 void AbortStream(const std::string& extension_id, |
52 const GURL& stream_url, | 56 const GURL& stream_url, |
53 const base::Closure& callback); | 57 const base::Closure& callback); |
54 | 58 |
55 // BrowserContextKeyedAPI implementation. | 59 // BrowserContextKeyedAPI implementation. |
56 static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance(); | 60 static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance(); |
57 | 61 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 | 101 |
98 private: | 102 private: |
99 void OnClose(); | 103 void OnClose(); |
100 | 104 |
101 std::string stream_url_; | 105 std::string stream_url_; |
102 }; | 106 }; |
103 | 107 |
104 } // namespace extensions | 108 } // namespace extensions |
105 | 109 |
106 #endif // CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ | 110 #endif // CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ |
OLD | NEW |