| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 175 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 176 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" | 176 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
| 177 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 177 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
| 178 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" | 178 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" |
| 179 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserGestureIndicat
or.h" | 179 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserGestureIndicat
or.h" |
| 180 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" | 180 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" |
| 181 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 181 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 182 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 182 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| 183 #include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderThem
e.h" | 183 #include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderThem
e.h" |
| 184 #include "ui/base/ui_base_switches.h" | 184 #include "ui/base/ui_base_switches.h" |
| 185 #include "ui/base/ui_base_switches_util.h" |
| 185 #include "ui/gfx/native_widget_types.h" | 186 #include "ui/gfx/native_widget_types.h" |
| 186 #include "ui/gfx/point.h" | 187 #include "ui/gfx/point.h" |
| 187 #include "ui/gfx/rect.h" | 188 #include "ui/gfx/rect.h" |
| 188 #include "ui/gfx/rect_conversions.h" | 189 #include "ui/gfx/rect_conversions.h" |
| 189 #include "ui/gfx/size_conversions.h" | 190 #include "ui/gfx/size_conversions.h" |
| 190 #include "ui/shell_dialogs/selected_file_info.h" | 191 #include "ui/shell_dialogs/selected_file_info.h" |
| 191 #include "v8/include/v8.h" | 192 #include "v8/include/v8.h" |
| 192 #include "webkit/appcache/web_application_cache_host_impl.h" | 193 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 193 #include "webkit/base/file_path_string_conversions.h" | 194 #include "webkit/base/file_path_string_conversions.h" |
| 194 #include "webkit/dom_storage/dom_storage_types.h" | 195 #include "webkit/dom_storage/dom_storage_types.h" |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 | 740 |
| 740 g_view_map.Get().insert(std::make_pair(webview(), this)); | 741 g_view_map.Get().insert(std::make_pair(webview(), this)); |
| 741 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); | 742 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); |
| 742 webview()->setDeviceScaleFactor(device_scale_factor_); | 743 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 743 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled( | 744 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled( |
| 744 ShouldUseFixedPositionCompositing(device_scale_factor_)); | 745 ShouldUseFixedPositionCompositing(device_scale_factor_)); |
| 745 | 746 |
| 746 webkit_preferences_.Apply(webview()); | 747 webkit_preferences_.Apply(webview()); |
| 747 webview()->initializeMainFrame(this); | 748 webview()->initializeMainFrame(this); |
| 748 | 749 |
| 749 if (command_line.HasSwitch(switches::kEnableTouchDragDrop)) | 750 if (switches::IsTouchDragDropEnabled()) |
| 750 webview()->settings()->setTouchDragDropEnabled(true); | 751 webview()->settings()->setTouchDragDropEnabled(true); |
| 751 | 752 |
| 752 if (command_line.HasSwitch(switches::kEnableTouchEditing)) | 753 if (switches::IsTouchEditingEnabled()) |
| 753 webview()->settings()->setTouchEditingEnabled(true); | 754 webview()->settings()->setTouchEditingEnabled(true); |
| 754 | 755 |
| 755 if (!params->frame_name.empty()) | 756 if (!params->frame_name.empty()) |
| 756 webview()->mainFrame()->setName(params->frame_name); | 757 webview()->mainFrame()->setName(params->frame_name); |
| 757 webview()->settings()->setMinimumTimerInterval( | 758 webview()->settings()->setMinimumTimerInterval( |
| 758 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : | 759 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : |
| 759 webkit_glue::kForegroundTabTimerInterval); | 760 webkit_glue::kForegroundTabTimerInterval); |
| 760 | 761 |
| 761 OnSetRendererPrefs(params->renderer_prefs); | 762 OnSetRendererPrefs(params->renderer_prefs); |
| 762 | 763 |
| (...skipping 5741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6504 WebURL url = icon_urls[i].iconURL(); | 6505 WebURL url = icon_urls[i].iconURL(); |
| 6505 if (!url.isEmpty()) | 6506 if (!url.isEmpty()) |
| 6506 urls.push_back(FaviconURL(url, | 6507 urls.push_back(FaviconURL(url, |
| 6507 ToFaviconType(icon_urls[i].iconType()))); | 6508 ToFaviconType(icon_urls[i].iconType()))); |
| 6508 } | 6509 } |
| 6509 SendUpdateFaviconURL(urls); | 6510 SendUpdateFaviconURL(urls); |
| 6510 } | 6511 } |
| 6511 | 6512 |
| 6512 | 6513 |
| 6513 } // namespace content | 6514 } // namespace content |
| OLD | NEW |