| 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 #endif | 617 #endif |
| 618 | 618 |
| 619 webwidget_ = WebView::create(this); | 619 webwidget_ = WebView::create(this); |
| 620 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); | 620 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); |
| 621 | 621 |
| 622 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 622 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 623 | 623 |
| 624 #if defined(OS_ANDROID) | 624 #if defined(OS_ANDROID) |
| 625 scoped_ptr<DeviceInfo> device_info(new DeviceInfo()); | 625 scoped_ptr<DeviceInfo> device_info(new DeviceInfo()); |
| 626 | 626 |
| 627 webview()->setDeviceScaleFactor(device_info->GetDPIScale()); | |
| 628 | |
| 629 const std::string region_code = | 627 const std::string region_code = |
| 630 command_line.HasSwitch(switches::kNetworkCountryIso) | 628 command_line.HasSwitch(switches::kNetworkCountryIso) |
| 631 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) | 629 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) |
| 632 : device_info->GetNetworkCountryIso(); | 630 : device_info->GetNetworkCountryIso(); |
| 633 content_detectors_.push_back(linked_ptr<ContentDetector>( | 631 content_detectors_.push_back(linked_ptr<ContentDetector>( |
| 634 new AddressDetector())); | 632 new AddressDetector())); |
| 635 content_detectors_.push_back(linked_ptr<ContentDetector>( | 633 content_detectors_.push_back(linked_ptr<ContentDetector>( |
| 636 new PhoneNumberDetector(region_code))); | 634 new PhoneNumberDetector(region_code))); |
| 637 content_detectors_.push_back(linked_ptr<ContentDetector>( | 635 content_detectors_.push_back(linked_ptr<ContentDetector>( |
| 638 new EmailDetector())); | 636 new EmailDetector())); |
| (...skipping 5729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6368 } | 6366 } |
| 6369 #endif | 6367 #endif |
| 6370 | 6368 |
| 6371 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6369 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6372 TransportDIB::Handle dib_handle) { | 6370 TransportDIB::Handle dib_handle) { |
| 6373 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6371 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6374 RenderProcess::current()->ReleaseTransportDIB(dib); | 6372 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6375 } | 6373 } |
| 6376 | 6374 |
| 6377 } // namespace content | 6375 } // namespace content |
| OLD | NEW |