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

Unified Diff: third_party/WebKit/Source/web/EditorClientImpl.cpp

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: added class-level comment Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/EditorClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/EditorClientImpl.cpp b/third_party/WebKit/Source/web/EditorClientImpl.cpp
index 680a97a3a832dd00d22dff190c71fa5c073a584c..8d98c794252da7b4e52d233c5c9a77956fa9850b 100644
--- a/third_party/WebKit/Source/web/EditorClientImpl.cpp
+++ b/third_party/WebKit/Source/web/EditorClientImpl.cpp
@@ -27,7 +27,7 @@
#include "web/EditorClientImpl.h"
#include "core/editing/SelectionType.h"
-#include "public/web/WebContentSettingsClient.h"
+#include "core/frame/ContentSettingsClient.h"
#include "public/web/WebFrameClient.h"
#include "public/web/WebViewClient.h"
#include "web/WebLocalFrameImpl.h"
@@ -52,18 +52,15 @@ void EditorClientImpl::respondToChangedContents() {
}
bool EditorClientImpl::canCopyCut(LocalFrame* frame, bool defaultValue) const {
- WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
- if (!webFrame->contentSettingsClient())
+ if (!frame->contentSettingsClient())
return defaultValue;
- return webFrame->contentSettingsClient()->allowWriteToClipboard(defaultValue);
+ return frame->contentSettingsClient()->allowWriteToClipboard(defaultValue);
}
bool EditorClientImpl::canPaste(LocalFrame* frame, bool defaultValue) const {
- WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
- if (!webFrame->contentSettingsClient())
+ if (!frame->contentSettingsClient())
return defaultValue;
- return webFrame->contentSettingsClient()->allowReadFromClipboard(
- defaultValue);
+ return frame->contentSettingsClient()->allowReadFromClipboard(defaultValue);
}
bool EditorClientImpl::handleKeyboardEvent(LocalFrame* frame) {

Powered by Google App Engine
This is Rietveld 408576698