Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Side by Side Diff: public/web/WebView.h

Issue 25505007: Remove bogus use of the term "user style" in Blink and Blink API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 struct WebWindowFeatures; 67 struct WebWindowFeatures;
68 68
69 class WebView : public WebWidget { 69 class WebView : public WebWidget {
70 public: 70 public:
71 BLINK_EXPORT static const double textSizeMultiplierRatio; 71 BLINK_EXPORT static const double textSizeMultiplierRatio;
72 BLINK_EXPORT static const double minTextSizeMultiplier; 72 BLINK_EXPORT static const double minTextSizeMultiplier;
73 BLINK_EXPORT static const double maxTextSizeMultiplier; 73 BLINK_EXPORT static const double maxTextSizeMultiplier;
74 BLINK_EXPORT static const float minPageScaleFactor; 74 BLINK_EXPORT static const float minPageScaleFactor;
75 BLINK_EXPORT static const float maxPageScaleFactor; 75 BLINK_EXPORT static const float maxPageScaleFactor;
76 76
77 enum StyleInjectionTarget {
78 InjectStyleInAllFrames,
79 InjectStyleInTopFrameOnly
80 };
81
82 // FIXME: Remove this enum once callers have switched to StyleInjectionTarge t
77 // Controls which frames user content is injected into. 83 // Controls which frames user content is injected into.
78 enum UserContentInjectIn { 84 enum UserContentInjectIn {
79 UserContentInjectInAllFrames, 85 UserContentInjectInAllFrames,
80 UserContentInjectInTopFrameOnly 86 UserContentInjectInTopFrameOnly
81 }; 87 };
82 88
89 // FIXME: Remove this enum once callers stop referring to it.
83 // Controls which documents user styles are injected into. 90 // Controls which documents user styles are injected into.
84 enum UserStyleInjectionTime { 91 enum UserStyleInjectionTime {
85 UserStyleInjectInExistingDocuments, 92 UserStyleInjectInExistingDocuments,
86 UserStyleInjectInSubsequentDocuments 93 UserStyleInjectInSubsequentDocuments
87 }; 94 };
88 95
89 96
90 // Initialization ------------------------------------------------------ 97 // Initialization ------------------------------------------------------
91 98
92 // Creates a WebView that is NOT yet initialized. You will need to 99 // Creates a WebView that is NOT yet initialized. You will need to
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 478
472 virtual void setScrollbarColors(unsigned inactiveColor, 479 virtual void setScrollbarColors(unsigned inactiveColor,
473 unsigned activeColor, 480 unsigned activeColor,
474 unsigned trackColor) = 0; 481 unsigned trackColor) = 0;
475 482
476 virtual void setSelectionColors(unsigned activeBackgroundColor, 483 virtual void setSelectionColors(unsigned activeBackgroundColor,
477 unsigned activeForegroundColor, 484 unsigned activeForegroundColor,
478 unsigned inactiveBackgroundColor, 485 unsigned inactiveBackgroundColor,
479 unsigned inactiveForegroundColor) = 0; 486 unsigned inactiveForegroundColor) = 0;
480 487
481 // User scripts -------------------------------------------------------- 488 // Injected style ------------------------------------------------------
489 BLINK_EXPORT static void injectStyleSheet(const WebString& sourceCode, const WebVector<WebString>& patterns, StyleInjectionTarget);
490 BLINK_EXPORT static void removeInjectedStyleSheets();
491
492 // FIXME: Remove these two methods once their callers have switched to the n ew names above.
482 BLINK_EXPORT static void addUserStyleSheet(const WebString& sourceCode, 493 BLINK_EXPORT static void addUserStyleSheet(const WebString& sourceCode,
483 const WebVector<WebString>& patt erns, 494 const WebVector<WebString>& patt erns,
484 UserContentInjectIn injectIn, 495 UserContentInjectIn injectIn,
485 UserStyleInjectionTime injection Time = UserStyleInjectInSubsequentDocuments); 496 UserStyleInjectionTime injection Time = UserStyleInjectInSubsequentDocuments);
486 BLINK_EXPORT static void removeAllUserContent(); 497 BLINK_EXPORT static void removeAllUserContent();
487 498
488 // Modal dialog support ------------------------------------------------ 499 // Modal dialog support ------------------------------------------------
489 500
490 // Call these methods before and after running a nested, modal event loop 501 // Call these methods before and after running a nested, modal event loop
491 // to suspend script callbacks and resource loads. 502 // to suspend script callbacks and resource loads.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 539
529 // Testing functionality for TestRunner --------------------------------- 540 // Testing functionality for TestRunner ---------------------------------
530 541
531 protected: 542 protected:
532 ~WebView() {} 543 ~WebView() {}
533 }; 544 };
534 545
535 } // namespace WebKit 546 } // namespace WebKit
536 547
537 #endif 548 #endif
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698