OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 WebLocalFrame_h | 5 #ifndef WebLocalFrame_h |
6 #define WebLocalFrame_h | 6 #define WebLocalFrame_h |
7 | 7 |
8 #include "WebCompositionUnderline.h" | 8 #include "WebCompositionUnderline.h" |
9 #include "WebFrame.h" | 9 #include "WebFrame.h" |
10 #include "WebFrameLoadType.h" | 10 #include "WebFrameLoadType.h" |
11 #include "WebHistoryItem.h" | 11 #include "WebHistoryItem.h" |
12 #include "public/platform/WebCachePolicy.h" | 12 #include "public/platform/WebCachePolicy.h" |
13 #include "public/platform/WebURLError.h" | 13 #include "public/platform/WebURLError.h" |
| 14 #include "public/platform/site_engagement.mojom-shared.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
17 } | 18 } |
18 | 19 |
19 namespace blink { | 20 namespace blink { |
20 | 21 |
21 class WebAutofillClient; | 22 class WebAutofillClient; |
22 class WebContentSettingsClient; | 23 class WebContentSettingsClient; |
23 class WebDevToolsAgent; | 24 class WebDevToolsAgent; |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 virtual WebFrameWidget* frameWidget() const = 0; | 431 virtual WebFrameWidget* frameWidget() const = 0; |
431 | 432 |
432 // Copy to the clipboard the image located at a particular point in visual | 433 // Copy to the clipboard the image located at a particular point in visual |
433 // viewport coordinates. | 434 // viewport coordinates. |
434 virtual void copyImageAt(const WebPoint&) = 0; | 435 virtual void copyImageAt(const WebPoint&) = 0; |
435 | 436 |
436 // Save as the image located at a particular point in visual viewport | 437 // Save as the image located at a particular point in visual viewport |
437 // coordinates. | 438 // coordinates. |
438 virtual void saveImageAt(const WebPoint&) = 0; | 439 virtual void saveImageAt(const WebPoint&) = 0; |
439 | 440 |
| 441 // Site engagement -------------------------------------------------------- |
| 442 |
| 443 // Sets the site engagement level for this frame's document. |
| 444 virtual void setEngagementLevel(mojom::EngagementLevel) = 0; |
| 445 |
440 // TEMP: Usage count for chrome.loadtimes deprecation. | 446 // TEMP: Usage count for chrome.loadtimes deprecation. |
441 // This will be removed following the deprecation. | 447 // This will be removed following the deprecation. |
442 virtual void usageCountChromeLoadTimes(const WebString& metric) = 0; | 448 virtual void usageCountChromeLoadTimes(const WebString& metric) = 0; |
443 | 449 |
444 // Task queues -------------------------------------------------------------- | 450 // Task queues -------------------------------------------------------------- |
445 | 451 |
446 // Returns frame-specific task runner to run tasks of this type on. | 452 // Returns frame-specific task runner to run tasks of this type on. |
447 // They have the same lifetime as the frame. | 453 // They have the same lifetime as the frame. |
448 virtual base::SingleThreadTaskRunner* timerTaskRunner() = 0; | 454 virtual base::SingleThreadTaskRunner* timerTaskRunner() = 0; |
449 virtual base::SingleThreadTaskRunner* loadingTaskRunner() = 0; | 455 virtual base::SingleThreadTaskRunner* loadingTaskRunner() = 0; |
450 virtual base::SingleThreadTaskRunner* unthrottledTaskRunner() = 0; | 456 virtual base::SingleThreadTaskRunner* unthrottledTaskRunner() = 0; |
451 | 457 |
452 protected: | 458 protected: |
453 explicit WebLocalFrame(WebTreeScopeType scope) : WebFrame(scope) {} | 459 explicit WebLocalFrame(WebTreeScopeType scope) : WebFrame(scope) {} |
454 | 460 |
455 // Inherited from WebFrame, but intentionally hidden: it never makes sense | 461 // Inherited from WebFrame, but intentionally hidden: it never makes sense |
456 // to call these on a WebLocalFrame. | 462 // to call these on a WebLocalFrame. |
457 bool isWebLocalFrame() const override = 0; | 463 bool isWebLocalFrame() const override = 0; |
458 WebLocalFrame* toWebLocalFrame() override = 0; | 464 WebLocalFrame* toWebLocalFrame() override = 0; |
459 bool isWebRemoteFrame() const override = 0; | 465 bool isWebRemoteFrame() const override = 0; |
460 WebRemoteFrame* toWebRemoteFrame() override = 0; | 466 WebRemoteFrame* toWebRemoteFrame() override = 0; |
461 }; | 467 }; |
462 | 468 |
463 } // namespace blink | 469 } // namespace blink |
464 | 470 |
465 #endif // WebLocalFrame_h | 471 #endif // WebLocalFrame_h |
OLD | NEW |