| 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 CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ |
| 6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ | 6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 base::FilePath file_path_; | 317 base::FilePath file_path_; |
| 318 | 318 |
| 319 // The mime type of the plugin. | 319 // The mime type of the plugin. |
| 320 std::string mime_type_; | 320 std::string mime_type_; |
| 321 | 321 |
| 322 // Holds the list of argument names and values passed to the plugin. We keep | 322 // Holds the list of argument names and values passed to the plugin. We keep |
| 323 // these so that we can re-initialize the plugin if we need to. | 323 // these so that we can re-initialize the plugin if we need to. |
| 324 std::vector<std::string> arg_names_; | 324 std::vector<std::string> arg_names_; |
| 325 std::vector<std::string> arg_values_; | 325 std::vector<std::string> arg_values_; |
| 326 | 326 |
| 327 base::WeakPtrFactory<WebPluginImpl> weak_factory_; | |
| 328 | |
| 329 class LoaderClient : public blink::WebURLLoaderClient { | 327 class LoaderClient : public blink::WebURLLoaderClient { |
| 330 public: | 328 public: |
| 331 LoaderClient(WebPluginImpl*); | 329 LoaderClient(WebPluginImpl*); |
| 332 | 330 |
| 333 virtual void willSendRequest(blink::WebURLLoader*, | 331 virtual void willSendRequest(blink::WebURLLoader*, |
| 334 blink::WebURLRequest&, | 332 blink::WebURLRequest&, |
| 335 const blink::WebURLResponse&) OVERRIDE; | 333 const blink::WebURLResponse&) OVERRIDE; |
| 336 virtual void didSendData(blink::WebURLLoader*, | 334 virtual void didSendData(blink::WebURLLoader*, |
| 337 unsigned long long bytesSent, | 335 unsigned long long bytesSent, |
| 338 unsigned long long totalBytesToBeSent) OVERRIDE; | 336 unsigned long long totalBytesToBeSent) OVERRIDE; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 353 int64_t total_encoded_data_length) OVERRIDE; | 351 int64_t total_encoded_data_length) OVERRIDE; |
| 354 virtual void didFail(blink::WebURLLoader*, | 352 virtual void didFail(blink::WebURLLoader*, |
| 355 const blink::WebURLError&) OVERRIDE; | 353 const blink::WebURLError&) OVERRIDE; |
| 356 | 354 |
| 357 private: | 355 private: |
| 358 WebPluginImpl* parent_; | 356 WebPluginImpl* parent_; |
| 359 }; | 357 }; |
| 360 | 358 |
| 361 LoaderClient loader_client_; | 359 LoaderClient loader_client_; |
| 362 | 360 |
| 361 base::WeakPtrFactory<WebPluginImpl> weak_factory_; |
| 362 |
| 363 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 363 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
| 364 }; | 364 }; |
| 365 | 365 |
| 366 } // namespace content | 366 } // namespace content |
| 367 | 367 |
| 368 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ | 368 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ |
| OLD | NEW |