| 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 WEBKIT_GLUE_WEBKIT_GLUE_H_ | 5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ | 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // calls AppendToLog with any leaked objects. Designed to be called on | 55 // calls AppendToLog with any leaked objects. Designed to be called on |
| 56 // shutdown. | 56 // shutdown. |
| 57 WEBKIT_GLUE_EXPORT void CheckForLeaks(); | 57 WEBKIT_GLUE_EXPORT void CheckForLeaks(); |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 // Decodes the image from the data in |image_data| into |image|. | 60 // Decodes the image from the data in |image_data| into |image|. |
| 61 // Returns false if the image could not be decoded. | 61 // Returns false if the image could not be decoded. |
| 62 WEBKIT_GLUE_EXPORT bool DecodeImage(const std::string& image_data, | 62 WEBKIT_GLUE_EXPORT bool DecodeImage(const std::string& image_data, |
| 63 SkBitmap* image); | 63 SkBitmap* image); |
| 64 | 64 |
| 65 // Tells the plugin thread to terminate the process forcefully instead of | |
| 66 // exiting cleanly. | |
| 67 void SetForcefullyTerminatePluginProcess(bool value); | |
| 68 | |
| 69 // Returns true if the plugin thread should terminate the process forcefully | |
| 70 // instead of exiting cleanly. | |
| 71 WEBKIT_GLUE_EXPORT bool ShouldForcefullyTerminatePluginProcess(); | |
| 72 | |
| 73 // File info conversion | 65 // File info conversion |
| 74 WEBKIT_GLUE_EXPORT void PlatformFileInfoToWebFileInfo( | 66 WEBKIT_GLUE_EXPORT void PlatformFileInfoToWebFileInfo( |
| 75 const base::PlatformFileInfo& file_info, | 67 const base::PlatformFileInfo& file_info, |
| 76 WebKit::WebFileInfo* web_file_info); | 68 WebKit::WebFileInfo* web_file_info); |
| 77 | 69 |
| 78 // Returns a WebCanvas pointer associated with the given Skia canvas. | 70 // Returns a WebCanvas pointer associated with the given Skia canvas. |
| 79 WEBKIT_GLUE_EXPORT WebKit::WebCanvas* ToWebCanvas(SkCanvas*); | 71 WEBKIT_GLUE_EXPORT WebKit::WebCanvas* ToWebCanvas(SkCanvas*); |
| 80 | 72 |
| 81 // Returns the number of currently-active glyph pages this process is using. | 73 // Returns the number of currently-active glyph pages this process is using. |
| 82 // There can be many such pages (maps of 256 character -> glyph) so this is | 74 // There can be many such pages (maps of 256 character -> glyph) so this is |
| (...skipping 17 matching lines...) Expand all Loading... |
| 100 // computed inside the sandbox and thus its not always accurate. | 92 // computed inside the sandbox and thus its not always accurate. |
| 101 WEBKIT_GLUE_EXPORT size_t MemoryUsageKB(); | 93 WEBKIT_GLUE_EXPORT size_t MemoryUsageKB(); |
| 102 | 94 |
| 103 // Converts from zoom factor (zoom percent / 100) to zoom level, where 0 means | 95 // Converts from zoom factor (zoom percent / 100) to zoom level, where 0 means |
| 104 // no zoom, positive numbers mean zoom in, negatives mean zoom out. | 96 // no zoom, positive numbers mean zoom in, negatives mean zoom out. |
| 105 WEBKIT_GLUE_EXPORT double ZoomFactorToZoomLevel(double factor); | 97 WEBKIT_GLUE_EXPORT double ZoomFactorToZoomLevel(double factor); |
| 106 | 98 |
| 107 } // namespace webkit_glue | 99 } // namespace webkit_glue |
| 108 | 100 |
| 109 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 101 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| OLD | NEW |