| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 struct WebPoint; | 66 struct WebPoint; |
| 67 | 67 |
| 68 class WebView : public WebWidget { | 68 class WebView : public WebWidget { |
| 69 public: | 69 public: |
| 70 WEBKIT_EXPORT static const double textSizeMultiplierRatio; | 70 WEBKIT_EXPORT static const double textSizeMultiplierRatio; |
| 71 WEBKIT_EXPORT static const double minTextSizeMultiplier; | 71 WEBKIT_EXPORT static const double minTextSizeMultiplier; |
| 72 WEBKIT_EXPORT static const double maxTextSizeMultiplier; | 72 WEBKIT_EXPORT static const double maxTextSizeMultiplier; |
| 73 WEBKIT_EXPORT static const float minPageScaleFactor; | 73 WEBKIT_EXPORT static const float minPageScaleFactor; |
| 74 WEBKIT_EXPORT static const float maxPageScaleFactor; | 74 WEBKIT_EXPORT static const float maxPageScaleFactor; |
| 75 | 75 |
| 76 // Controls the time that user scripts injected into the document run. | |
| 77 enum UserScriptInjectAt { | |
| 78 UserScriptInjectAtDocumentStart, | |
| 79 UserScriptInjectAtDocumentEnd | |
| 80 }; | |
| 81 | |
| 82 // Controls which frames user content is injected into. | 76 // Controls which frames user content is injected into. |
| 83 enum UserContentInjectIn { | 77 enum UserContentInjectIn { |
| 84 UserContentInjectInAllFrames, | 78 UserContentInjectInAllFrames, |
| 85 UserContentInjectInTopFrameOnly | 79 UserContentInjectInTopFrameOnly |
| 86 }; | 80 }; |
| 87 | 81 |
| 88 // Controls which documents user styles are injected into. | 82 // Controls which documents user styles are injected into. |
| 89 enum UserStyleInjectionTime { | 83 enum UserStyleInjectionTime { |
| 90 UserStyleInjectInExistingDocuments, | 84 UserStyleInjectInExistingDocuments, |
| 91 UserStyleInjectInSubsequentDocuments | 85 UserStyleInjectInSubsequentDocuments |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 virtual void setScrollbarColors(unsigned inactiveColor, | 431 virtual void setScrollbarColors(unsigned inactiveColor, |
| 438 unsigned activeColor, | 432 unsigned activeColor, |
| 439 unsigned trackColor) = 0; | 433 unsigned trackColor) = 0; |
| 440 | 434 |
| 441 virtual void setSelectionColors(unsigned activeBackgroundColor, | 435 virtual void setSelectionColors(unsigned activeBackgroundColor, |
| 442 unsigned activeForegroundColor, | 436 unsigned activeForegroundColor, |
| 443 unsigned inactiveBackgroundColor, | 437 unsigned inactiveBackgroundColor, |
| 444 unsigned inactiveForegroundColor) = 0; | 438 unsigned inactiveForegroundColor) = 0; |
| 445 | 439 |
| 446 // User scripts -------------------------------------------------------- | 440 // User scripts -------------------------------------------------------- |
| 447 WEBKIT_EXPORT static void addUserScript(const WebString& sourceCode, | |
| 448 const WebVector<WebString>& patterns
, | |
| 449 UserScriptInjectAt injectAt, | |
| 450 UserContentInjectIn injectIn); | |
| 451 WEBKIT_EXPORT static void addUserStyleSheet(const WebString& sourceCode, | 441 WEBKIT_EXPORT static void addUserStyleSheet(const WebString& sourceCode, |
| 452 const WebVector<WebString>& patt
erns, | 442 const WebVector<WebString>& patt
erns, |
| 453 UserContentInjectIn injectIn, | 443 UserContentInjectIn injectIn, |
| 454 UserStyleInjectionTime injection
Time = UserStyleInjectInSubsequentDocuments); | 444 UserStyleInjectionTime injection
Time = UserStyleInjectInSubsequentDocuments); |
| 455 WEBKIT_EXPORT static void removeAllUserContent(); | 445 WEBKIT_EXPORT static void removeAllUserContent(); |
| 456 | 446 |
| 457 // Modal dialog support ------------------------------------------------ | 447 // Modal dialog support ------------------------------------------------ |
| 458 | 448 |
| 459 // Call these methods before and after running a nested, modal event loop | 449 // Call these methods before and after running a nested, modal event loop |
| 460 // to suspend script callbacks and resource loads. | 450 // to suspend script callbacks and resource loads. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 497 |
| 508 // Testing functionality for TestRunner --------------------------------- | 498 // Testing functionality for TestRunner --------------------------------- |
| 509 | 499 |
| 510 protected: | 500 protected: |
| 511 ~WebView() {} | 501 ~WebView() {} |
| 512 }; | 502 }; |
| 513 | 503 |
| 514 } // namespace WebKit | 504 } // namespace WebKit |
| 515 | 505 |
| 516 #endif | 506 #endif |
| OLD | NEW |