Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1350)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 11087067: Upstream deviceScaleFactor initialization in render_view_impl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 #endif 651 #endif
652 652
653 webwidget_ = WebView::create(this); 653 webwidget_ = WebView::create(this);
654 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); 654 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_));
655 655
656 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 656 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
657 657
658 #if defined(OS_ANDROID) 658 #if defined(OS_ANDROID)
659 scoped_ptr<content::DeviceInfo> device_info(new content::DeviceInfo()); 659 scoped_ptr<content::DeviceInfo> device_info(new content::DeviceInfo());
660 660
661 float device_scale_factor = device_info->GetDPIScale();
662 if (device_scale_factor != webview()->deviceScaleFactor()) {
aelias_OOO_until_Jul13 2012/10/10 22:14:12 No need for this if statement, the receiver does t
663 webview()->setDeviceScaleFactor(device_scale_factor);
664 }
665
661 const std::string region_code = 666 const std::string region_code =
662 command_line.HasSwitch(switches::kNetworkCountryIso) 667 command_line.HasSwitch(switches::kNetworkCountryIso)
663 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso) 668 ? command_line.GetSwitchValueASCII(switches::kNetworkCountryIso)
664 : device_info->GetNetworkCountryIso(); 669 : device_info->GetNetworkCountryIso();
665 content_detectors_.push_back(linked_ptr<ContentDetector>( 670 content_detectors_.push_back(linked_ptr<ContentDetector>(
666 new AddressDetector())); 671 new AddressDetector()));
667 content_detectors_.push_back(linked_ptr<ContentDetector>( 672 content_detectors_.push_back(linked_ptr<ContentDetector>(
668 new PhoneNumberDetector(region_code))); 673 new PhoneNumberDetector(region_code)));
669 content_detectors_.push_back(linked_ptr<ContentDetector>( 674 content_detectors_.push_back(linked_ptr<ContentDetector>(
670 new EmailDetector())); 675 new EmailDetector()));
(...skipping 5679 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 6355
6351 updating_frame_tree_ = true; 6356 updating_frame_tree_ = true;
6352 active_frame_id_map_.clear(); 6357 active_frame_id_map_.clear();
6353 6358
6354 target_process_id_ = process_id; 6359 target_process_id_ = process_id;
6355 target_routing_id_ = route_id; 6360 target_routing_id_ = route_id;
6356 CreateFrameTree(webview()->mainFrame(), frames); 6361 CreateFrameTree(webview()->mainFrame(), frames);
6357 6362
6358 updating_frame_tree_ = false; 6363 updating_frame_tree_ = false;
6359 } 6364 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698