| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 341 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 342 virtual bool Delete(const GURL& path, | 342 virtual bool Delete(const GURL& path, |
| 343 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 343 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 344 virtual bool Rename(const GURL& file_path, | 344 virtual bool Rename(const GURL& file_path, |
| 345 const GURL& new_file_path, | 345 const GURL& new_file_path, |
| 346 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 346 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 347 virtual bool ReadDirectory( | 347 virtual bool ReadDirectory( |
| 348 const GURL& directory_path, | 348 const GURL& directory_path, |
| 349 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 349 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 350 | 350 |
| 351 // Takes a UTF-8 string representing the enterprise policy, and pushes it to | |
| 352 // every plugin instance that has called SubscribeToPolicyUpdates(). | |
| 353 // | |
| 354 // This should be called when the enterprise policy is updated. | |
| 355 virtual void PublishPolicy(const std::string& policy_json) = 0; | |
| 356 | |
| 357 // For quota handlings for FileIO API. | 351 // For quota handlings for FileIO API. |
| 358 typedef base::Callback<void (int64)> AvailableSpaceCallback; | 352 typedef base::Callback<void (int64)> AvailableSpaceCallback; |
| 359 virtual void QueryAvailableSpace(const GURL& origin, | 353 virtual void QueryAvailableSpace(const GURL& origin, |
| 360 quota::StorageType type, | 354 quota::StorageType type, |
| 361 const AvailableSpaceCallback& callback) = 0; | 355 const AvailableSpaceCallback& callback) = 0; |
| 362 virtual void WillUpdateFile(const GURL& file_path) = 0; | 356 virtual void WillUpdateFile(const GURL& file_path) = 0; |
| 363 virtual void DidUpdateFile(const GURL& file_path, int64_t delta) = 0; | 357 virtual void DidUpdateFile(const GURL& file_path, int64_t delta) = 0; |
| 364 | 358 |
| 365 virtual base::PlatformFileError OpenFile(const PepperFilePath& path, | 359 virtual base::PlatformFileError OpenFile(const PepperFilePath& path, |
| 366 int flags, | 360 int flags, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 // size. | 402 // size. |
| 409 virtual gfx::Size GetScreenSize() = 0; | 403 virtual gfx::Size GetScreenSize() = 0; |
| 410 | 404 |
| 411 // Returns a string with the name of the default 8-bit char encoding. | 405 // Returns a string with the name of the default 8-bit char encoding. |
| 412 virtual std::string GetDefaultEncoding() = 0; | 406 virtual std::string GetDefaultEncoding() = 0; |
| 413 | 407 |
| 414 // Sets the minimum and maximum zoom factors. | 408 // Sets the minimum and maximum zoom factors. |
| 415 virtual void ZoomLimitsChanged(double minimum_factor, | 409 virtual void ZoomLimitsChanged(double minimum_factor, |
| 416 double maximum_factor) = 0; | 410 double maximum_factor) = 0; |
| 417 | 411 |
| 418 // Subscribes the instances to notifications that the policy has been | |
| 419 // updated. | |
| 420 virtual void SubscribeToPolicyUpdates(PluginInstance* instance) = 0; | |
| 421 | |
| 422 // Retrieves the proxy information for the given URL in PAC format. On error, | 412 // Retrieves the proxy information for the given URL in PAC format. On error, |
| 423 // this will return an empty string. | 413 // this will return an empty string. |
| 424 virtual std::string ResolveProxy(const GURL& url) = 0; | 414 virtual std::string ResolveProxy(const GURL& url) = 0; |
| 425 | 415 |
| 426 // Tell the browser when resource loading starts/ends. | 416 // Tell the browser when resource loading starts/ends. |
| 427 virtual void DidStartLoading() = 0; | 417 virtual void DidStartLoading() = 0; |
| 428 virtual void DidStopLoading() = 0; | 418 virtual void DidStopLoading() = 0; |
| 429 | 419 |
| 430 // Sets restrictions on how the content can be used (i.e. no print/copy). | 420 // Sets restrictions on how the content can be used (i.e. no print/copy). |
| 431 virtual void SetContentRestriction(int restrictions) = 0; | 421 virtual void SetContentRestriction(int restrictions) = 0; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 virtual void DidReceiveMouseEvent(PluginInstance* instance) = 0; | 463 virtual void DidReceiveMouseEvent(PluginInstance* instance) = 0; |
| 474 | 464 |
| 475 // Determines if the browser entered fullscreen mode. | 465 // Determines if the browser entered fullscreen mode. |
| 476 virtual bool IsInFullscreenMode() = 0; | 466 virtual bool IsInFullscreenMode() = 0; |
| 477 }; | 467 }; |
| 478 | 468 |
| 479 } // namespace ppapi | 469 } // namespace ppapi |
| 480 } // namespace webkit | 470 } // namespace webkit |
| 481 | 471 |
| 482 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 472 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |