| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 #endif | 618 #endif |
| 619 | 619 |
| 620 webwidget_ = WebView::create(this); | 620 webwidget_ = WebView::create(this); |
| 621 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); | 621 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); |
| 622 | 622 |
| 623 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 623 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 624 | 624 |
| 625 #if defined(OS_ANDROID) | 625 #if defined(OS_ANDROID) |
| 626 scoped_ptr<DeviceInfo> device_info(new DeviceInfo()); | 626 scoped_ptr<DeviceInfo> device_info(new DeviceInfo()); |
| 627 | 627 |
| 628 webview()->setDeviceScaleFactor(device_info->GetDPIScale()); | |
| 629 | |
| 630 const std::string region_code = | 628 const std::string region_code = |
| 631 command_line.HasSwitch(switches::kNetworkCountryIso) | 629 command_line.HasSwitch(switches::kNetworkCountryIso) |
| 632 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) | 630 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) |
| 633 : device_info->GetNetworkCountryIso(); | 631 : device_info->GetNetworkCountryIso(); |
| 634 content_detectors_.push_back(linked_ptr<ContentDetector>( | 632 content_detectors_.push_back(linked_ptr<ContentDetector>( |
| 635 new AddressDetector())); | 633 new AddressDetector())); |
| 636 content_detectors_.push_back(linked_ptr<ContentDetector>( | 634 content_detectors_.push_back(linked_ptr<ContentDetector>( |
| 637 new PhoneNumberDetector(region_code))); | 635 new PhoneNumberDetector(region_code))); |
| 638 content_detectors_.push_back(linked_ptr<ContentDetector>( | 636 content_detectors_.push_back(linked_ptr<ContentDetector>( |
| 639 new EmailDetector())); | 637 new EmailDetector())); |
| (...skipping 5709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6349 } | 6347 } |
| 6350 #endif | 6348 #endif |
| 6351 | 6349 |
| 6352 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6350 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6353 TransportDIB::Handle dib_handle) { | 6351 TransportDIB::Handle dib_handle) { |
| 6354 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6352 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6355 RenderProcess::current()->ReleaseTransportDIB(dib); | 6353 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6356 } | 6354 } |
| 6357 | 6355 |
| 6358 } // namespace content | 6356 } // namespace content |
| OLD | NEW |