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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.h

Issue 2471153002: [scheduler] Use Finch to control background throttling. (Closed)
Patch Set: Fix test and address comments Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 class WebPlugin; 93 class WebPlugin;
94 class WebRemoteFrame; 94 class WebRemoteFrame;
95 class WebSettingsImpl; 95 class WebSettingsImpl;
96 class WebViewScheduler; 96 class WebViewScheduler;
97 97
98 class WEB_EXPORT WebViewImpl final 98 class WEB_EXPORT WebViewImpl final
99 : WTF_NON_EXPORTED_BASE(public WebView), 99 : WTF_NON_EXPORTED_BASE(public WebView),
100 public RefCounted<WebViewImpl>, 100 public RefCounted<WebViewImpl>,
101 WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget), 101 WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget),
102 public PageWidgetEventHandler, 102 public PageWidgetEventHandler,
103 public WebScheduler::InterventionReporter { 103 public WebScheduler::InterventionReporter,
104 public WebViewScheduler::WebViewSchedulerSettings {
104 public: 105 public:
105 static WebViewImpl* create(WebViewClient*, WebPageVisibilityState); 106 static WebViewImpl* create(WebViewClient*, WebPageVisibilityState);
106 static HashSet<WebViewImpl*>& allInstances(); 107 static HashSet<WebViewImpl*>& allInstances();
107 108
108 // WebWidget methods: 109 // WebWidget methods:
109 void close() override; 110 void close() override;
110 WebSize size() override; 111 WebSize size() override;
111 void resize(const WebSize&) override; 112 void resize(const WebSize&) override;
112 void resizeVisualViewport(const WebSize&) override; 113 void resizeVisualViewport(const WebSize&) override;
113 void didEnterFullscreen() override; 114 void didEnterFullscreen() override;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 bool isFlinging() const override { return !!m_gestureAnimation.get(); } 273 bool isFlinging() const override { return !!m_gestureAnimation.get(); }
273 void setShowPaintRects(bool) override; 274 void setShowPaintRects(bool) override;
274 void setShowDebugBorders(bool); 275 void setShowDebugBorders(bool);
275 void setShowFPSCounter(bool) override; 276 void setShowFPSCounter(bool) override;
276 void setShowScrollBottleneckRects(bool) override; 277 void setShowScrollBottleneckRects(bool) override;
277 void acceptLanguagesChanged() override; 278 void acceptLanguagesChanged() override;
278 279
279 // WebScheduler::InterventionReporter implementation: 280 // WebScheduler::InterventionReporter implementation:
280 void ReportIntervention(const WebString& message) override; 281 void ReportIntervention(const WebString& message) override;
281 282
283 // WebViewScheduler::WebViewSchedulerSettings implementation:
284 float expensiveBackgroundThrottlingCPUBudget() override;
285 float expensiveBackgroundThrottlingInitialBudget() override;
286 float expensiveBackgroundThrottlingMaxBudget() override;
287 float expensiveBackgroundThrottlingMaxDelay() override;
288
282 void didUpdateFullscreenSize(); 289 void didUpdateFullscreenSize();
283 290
284 float defaultMinimumPageScaleFactor() const; 291 float defaultMinimumPageScaleFactor() const;
285 float defaultMaximumPageScaleFactor() const; 292 float defaultMaximumPageScaleFactor() const;
286 float minimumPageScaleFactor() const; 293 float minimumPageScaleFactor() const;
287 float maximumPageScaleFactor() const; 294 float maximumPageScaleFactor() const;
288 float clampPageScaleFactorToLimits(float) const; 295 float clampPageScaleFactorToLimits(float) const;
289 void resetScaleStateImmediately(); 296 void resetScaleStateImmediately();
290 297
291 HitTestResult coreHitTestResultAt(const WebPoint&); 298 HitTestResult coreHitTestResultAt(const WebPoint&);
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; 766 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor;
760 }; 767 };
761 768
762 // We have no ways to check if the specified WebView is an instance of 769 // We have no ways to check if the specified WebView is an instance of
763 // WebViewImpl because WebViewImpl is the only implementation of WebView. 770 // WebViewImpl because WebViewImpl is the only implementation of WebView.
764 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 771 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
765 772
766 } // namespace blink 773 } // namespace blink
767 774
768 #endif 775 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSettingsImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698