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/bind.h" | 10 #include "base/bind.h" |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 #endif | 621 #endif |
622 | 622 |
623 webwidget_ = WebView::create(this); | 623 webwidget_ = WebView::create(this); |
624 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); | 624 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); |
625 | 625 |
626 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 626 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
627 | 627 |
628 #if defined(OS_ANDROID) | 628 #if defined(OS_ANDROID) |
629 scoped_ptr<DeviceInfo> device_info(new DeviceInfo()); | 629 scoped_ptr<DeviceInfo> device_info(new DeviceInfo()); |
630 | 630 |
631 webview()->setDeviceScaleFactor(device_info->GetDPIScale()); | |
632 | |
633 const std::string region_code = | 631 const std::string region_code = |
634 command_line.HasSwitch(switches::kNetworkCountryIso) | 632 command_line.HasSwitch(switches::kNetworkCountryIso) |
635 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) | 633 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) |
636 : device_info->GetNetworkCountryIso(); | 634 : device_info->GetNetworkCountryIso(); |
637 content_detectors_.push_back(linked_ptr<ContentDetector>( | 635 content_detectors_.push_back(linked_ptr<ContentDetector>( |
638 new AddressDetector())); | 636 new AddressDetector())); |
639 content_detectors_.push_back(linked_ptr<ContentDetector>( | 637 content_detectors_.push_back(linked_ptr<ContentDetector>( |
640 new PhoneNumberDetector(region_code))); | 638 new PhoneNumberDetector(region_code))); |
641 content_detectors_.push_back(linked_ptr<ContentDetector>( | 639 content_detectors_.push_back(linked_ptr<ContentDetector>( |
642 new EmailDetector())); | 640 new EmailDetector())); |
(...skipping 5674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6317 } | 6315 } |
6318 #endif | 6316 #endif |
6319 | 6317 |
6320 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6318 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6321 TransportDIB::Handle dib_handle) { | 6319 TransportDIB::Handle dib_handle) { |
6322 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6320 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6323 RenderProcess::current()->ReleaseTransportDIB(dib); | 6321 RenderProcess::current()->ReleaseTransportDIB(dib); |
6324 } | 6322 } |
6325 | 6323 |
6326 } // namespace content | 6324 } // namespace content |
OLD | NEW |