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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 658183002: Add support for DOM3 KeyboardEvent keycode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per code review comments Created 6 years 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" 175 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h"
176 #include "third_party/WebKit/public/web/WebSettings.h" 176 #include "third_party/WebKit/public/web/WebSettings.h"
177 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 177 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
178 #include "third_party/WebKit/public/web/WebView.h" 178 #include "third_party/WebKit/public/web/WebView.h"
179 #include "third_party/WebKit/public/web/WebWindowFeatures.h" 179 #include "third_party/WebKit/public/web/WebWindowFeatures.h"
180 #include "third_party/WebKit/public/web/default/WebRenderTheme.h" 180 #include "third_party/WebKit/public/web/default/WebRenderTheme.h"
181 #include "third_party/icu/source/common/unicode/uchar.h" 181 #include "third_party/icu/source/common/unicode/uchar.h"
182 #include "third_party/icu/source/common/unicode/uscript.h" 182 #include "third_party/icu/source/common/unicode/uscript.h"
183 #include "ui/base/clipboard/clipboard.h" 183 #include "ui/base/clipboard/clipboard.h"
184 #include "ui/base/ui_base_switches_util.h" 184 #include "ui/base/ui_base_switches_util.h"
185 #include "ui/events/keycodes/dom4/keycode_converter.h"
185 #include "ui/events/latency_info.h" 186 #include "ui/events/latency_info.h"
186 #include "ui/gfx/native_widget_types.h" 187 #include "ui/gfx/native_widget_types.h"
187 #include "ui/gfx/point.h" 188 #include "ui/gfx/point.h"
188 #include "ui/gfx/rect.h" 189 #include "ui/gfx/rect.h"
189 #include "ui/gfx/rect_conversions.h" 190 #include "ui/gfx/rect_conversions.h"
190 #include "ui/gfx/size_conversions.h" 191 #include "ui/gfx/size_conversions.h"
191 #include "v8/include/v8.h" 192 #include "v8/include/v8.h"
192 193
193 #if defined(OS_ANDROID) 194 #if defined(OS_ANDROID)
194 #include <cpu-features.h> 195 #include <cpu-features.h>
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 if (!frame->executeCommand(WebString::fromUTF8(it->name), 1814 if (!frame->executeCommand(WebString::fromUTF8(it->name),
1814 WebString::fromUTF8(it->value), 1815 WebString::fromUTF8(it->value),
1815 GetFocusedElement())) 1816 GetFocusedElement()))
1816 break; 1817 break;
1817 did_execute_command = true; 1818 did_execute_command = true;
1818 } 1819 }
1819 1820
1820 return did_execute_command; 1821 return did_execute_command;
1821 } 1822 }
1822 1823
1824 const char* RenderViewImpl::keyboardDOMCodeValue(int native) {
1825 return ui::KeycodeConverter::NativeKeycodeToCode(native);
Wez 2014/12/02 04:03:14 Two-space indent for the body of the method.
Habib Virji 2014/12/02 12:07:45 Done.
1826 }
1827
1823 bool RenderViewImpl::runFileChooser( 1828 bool RenderViewImpl::runFileChooser(
1824 const blink::WebFileChooserParams& params, 1829 const blink::WebFileChooserParams& params,
1825 WebFileChooserCompletion* chooser_completion) { 1830 WebFileChooserCompletion* chooser_completion) {
1826 // Do not open the file dialog in a hidden RenderView. 1831 // Do not open the file dialog in a hidden RenderView.
1827 if (is_hidden()) 1832 if (is_hidden())
1828 return false; 1833 return false;
1829 FileChooserParams ipc_params; 1834 FileChooserParams ipc_params;
1830 if (params.directory) 1835 if (params.directory)
1831 ipc_params.mode = FileChooserParams::UploadFolder; 1836 ipc_params.mode = FileChooserParams::UploadFolder;
1832 else if (params.multiSelect) 1837 else if (params.multiSelect)
(...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
4229 std::vector<gfx::Size> sizes; 4234 std::vector<gfx::Size> sizes;
4230 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4235 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4231 if (!url.isEmpty()) 4236 if (!url.isEmpty())
4232 urls.push_back( 4237 urls.push_back(
4233 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4238 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4234 } 4239 }
4235 SendUpdateFaviconURL(urls); 4240 SendUpdateFaviconURL(urls);
4236 } 4241 }
4237 4242
4238 } // namespace content 4243 } // namespace content
OLDNEW
« content/renderer/render_view_impl.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698