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

Side by Side Diff: Source/web/EditorClientImpl.cpp

Issue 462353003: Cleanup namespace usage in Source/web[A-V]*.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minor updates Created 6 years, 4 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
« no previous file with comments | « Source/web/DragClientImpl.cpp ('k') | Source/web/ExternalDateTimeChooser.cpp » ('j') | 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) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 16 matching lines...) Expand all
27 #include "config.h" 27 #include "config.h"
28 #include "web/EditorClientImpl.h" 28 #include "web/EditorClientImpl.h"
29 29
30 #include "core/editing/SelectionType.h" 30 #include "core/editing/SelectionType.h"
31 #include "public/web/WebFrameClient.h" 31 #include "public/web/WebFrameClient.h"
32 #include "public/web/WebPermissionClient.h" 32 #include "public/web/WebPermissionClient.h"
33 #include "public/web/WebViewClient.h" 33 #include "public/web/WebViewClient.h"
34 #include "web/WebLocalFrameImpl.h" 34 #include "web/WebLocalFrameImpl.h"
35 #include "web/WebViewImpl.h" 35 #include "web/WebViewImpl.h"
36 36
37 using namespace blink;
38
39 namespace blink { 37 namespace blink {
40 38
41 EditorClientImpl::EditorClientImpl(WebViewImpl* webview) 39 EditorClientImpl::EditorClientImpl(WebViewImpl* webview)
42 : m_webView(webview) 40 : m_webView(webview)
43 { 41 {
44 } 42 }
45 43
46 EditorClientImpl::~EditorClientImpl() 44 EditorClientImpl::~EditorClientImpl()
47 { 45 {
48 } 46 }
49 47
50 void EditorClientImpl::respondToChangedSelection(LocalFrame* frame, blink::Selec tionType selectionType) 48 void EditorClientImpl::respondToChangedSelection(LocalFrame* frame, SelectionTyp e selectionType)
51 { 49 {
52 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); 50 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
53 if (webFrame->client()) 51 if (webFrame->client())
54 webFrame->client()->didChangeSelection(selectionType != blink::RangeSele ction); 52 webFrame->client()->didChangeSelection(selectionType != RangeSelection);
55 } 53 }
56 54
57 void EditorClientImpl::respondToChangedContents() 55 void EditorClientImpl::respondToChangedContents()
58 { 56 {
59 if (m_webView->client()) 57 if (m_webView->client())
60 m_webView->client()->didChangeContents(); 58 m_webView->client()->didChangeContents();
61 } 59 }
62 60
63 bool EditorClientImpl::canCopyCut(LocalFrame* frame, bool defaultValue) const 61 bool EditorClientImpl::canCopyCut(LocalFrame* frame, bool defaultValue) const
64 { 62 {
65 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); 63 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
66 if (!webFrame->permissionClient()) 64 if (!webFrame->permissionClient())
67 return defaultValue; 65 return defaultValue;
68 return webFrame->permissionClient()->allowWriteToClipboard(defaultValue); 66 return webFrame->permissionClient()->allowWriteToClipboard(defaultValue);
69 } 67 }
70 68
71 bool EditorClientImpl::canPaste(LocalFrame* frame, bool defaultValue) const 69 bool EditorClientImpl::canPaste(LocalFrame* frame, bool defaultValue) const
72 { 70 {
73 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); 71 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
74 if (!webFrame->permissionClient()) 72 if (!webFrame->permissionClient())
75 return defaultValue; 73 return defaultValue;
76 return webFrame->permissionClient()->allowReadFromClipboard(defaultValue); 74 return webFrame->permissionClient()->allowReadFromClipboard(defaultValue);
77 } 75 }
78 76
79 bool EditorClientImpl::handleKeyboardEvent() 77 bool EditorClientImpl::handleKeyboardEvent()
80 { 78 {
81 return m_webView->client() && m_webView->client()->handleCurrentKeyboardEven t(); 79 return m_webView->client() && m_webView->client()->handleCurrentKeyboardEven t();
82 } 80 }
83 81
84 } // namesace blink 82 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/DragClientImpl.cpp ('k') | Source/web/ExternalDateTimeChooser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698