OLD | NEW |
---|---|
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 176 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
177 #include "third_party/WebKit/public/web/WebSettings.h" | 177 #include "third_party/WebKit/public/web/WebSettings.h" |
178 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 178 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
179 #include "third_party/WebKit/public/web/WebView.h" | 179 #include "third_party/WebKit/public/web/WebView.h" |
180 #include "third_party/WebKit/public/web/WebWindowFeatures.h" | 180 #include "third_party/WebKit/public/web/WebWindowFeatures.h" |
181 #include "third_party/WebKit/public/web/default/WebRenderTheme.h" | 181 #include "third_party/WebKit/public/web/default/WebRenderTheme.h" |
182 #include "third_party/icu/source/common/unicode/uchar.h" | 182 #include "third_party/icu/source/common/unicode/uchar.h" |
183 #include "third_party/icu/source/common/unicode/uscript.h" | 183 #include "third_party/icu/source/common/unicode/uscript.h" |
184 #include "ui/base/clipboard/clipboard.h" | 184 #include "ui/base/clipboard/clipboard.h" |
185 #include "ui/base/ui_base_switches_util.h" | 185 #include "ui/base/ui_base_switches_util.h" |
186 #include "ui/events/keycodes/dom4/keycode_converter.h" | |
186 #include "ui/events/latency_info.h" | 187 #include "ui/events/latency_info.h" |
187 #include "ui/gfx/native_widget_types.h" | 188 #include "ui/gfx/native_widget_types.h" |
188 #include "ui/gfx/point.h" | 189 #include "ui/gfx/point.h" |
189 #include "ui/gfx/rect.h" | 190 #include "ui/gfx/rect.h" |
190 #include "ui/gfx/rect_conversions.h" | 191 #include "ui/gfx/rect_conversions.h" |
191 #include "ui/gfx/size_conversions.h" | 192 #include "ui/gfx/size_conversions.h" |
192 #include "v8/include/v8.h" | 193 #include "v8/include/v8.h" |
193 | 194 |
194 #if defined(OS_ANDROID) | 195 #if defined(OS_ANDROID) |
195 #include <cpu-features.h> | 196 #include <cpu-features.h> |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1777 if (!frame->executeCommand(WebString::fromUTF8(it->name), | 1778 if (!frame->executeCommand(WebString::fromUTF8(it->name), |
1778 WebString::fromUTF8(it->value), | 1779 WebString::fromUTF8(it->value), |
1779 GetFocusedElement())) | 1780 GetFocusedElement())) |
1780 break; | 1781 break; |
1781 did_execute_command = true; | 1782 did_execute_command = true; |
1782 } | 1783 } |
1783 | 1784 |
1784 return did_execute_command; | 1785 return did_execute_command; |
1785 } | 1786 } |
1786 | 1787 |
1788 const char* RenderViewImpl::getKeyboardDOMCodeValue( | |
1789 int native) { | |
apavlov
2014/11/12 08:56:32
This seems to fit 80 chars unwrapped?
Habib Virji
2014/11/24 15:13:09
Done.
| |
1790 return ui::KeycodeConverter::NativeKeycodeToCode(native); | |
1791 } | |
1792 | |
1787 bool RenderViewImpl::runFileChooser( | 1793 bool RenderViewImpl::runFileChooser( |
1788 const blink::WebFileChooserParams& params, | 1794 const blink::WebFileChooserParams& params, |
1789 WebFileChooserCompletion* chooser_completion) { | 1795 WebFileChooserCompletion* chooser_completion) { |
1790 // Do not open the file dialog in a hidden RenderView. | 1796 // Do not open the file dialog in a hidden RenderView. |
1791 if (is_hidden()) | 1797 if (is_hidden()) |
1792 return false; | 1798 return false; |
1793 FileChooserParams ipc_params; | 1799 FileChooserParams ipc_params; |
1794 if (params.directory) | 1800 if (params.directory) |
1795 ipc_params.mode = FileChooserParams::UploadFolder; | 1801 ipc_params.mode = FileChooserParams::UploadFolder; |
1796 else if (params.multiSelect) | 1802 else if (params.multiSelect) |
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4212 std::vector<gfx::Size> sizes; | 4218 std::vector<gfx::Size> sizes; |
4213 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4219 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4214 if (!url.isEmpty()) | 4220 if (!url.isEmpty()) |
4215 urls.push_back( | 4221 urls.push_back( |
4216 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4222 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4217 } | 4223 } |
4218 SendUpdateFaviconURL(urls); | 4224 SendUpdateFaviconURL(urls); |
4219 } | 4225 } |
4220 | 4226 |
4221 } // namespace content | 4227 } // namespace content |
OLD | NEW |