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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 12089100: Delete flag --enable-css-transform-pinch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // process. We treat it like the tab is crashed. If the content is loaded 164 // process. We treat it like the tab is crashed. If the content is loaded
165 // when the tab is shown, tab_crashed_ will be reset. Since 165 // when the tab is shown, tab_crashed_ will be reset. Since
166 // RenderWidgetHostView is associated with the lifetime of the renderer 166 // RenderWidgetHostView is associated with the lifetime of the renderer
167 // process, we use it to test whether there is a renderer process. 167 // process, we use it to test whether there is a renderer process.
168 tab_crashed_ = !(web_contents->GetRenderWidgetHostView()); 168 tab_crashed_ = !(web_contents->GetRenderWidgetHostView());
169 169
170 // TODO(leandrogracia): make use of the hardware_accelerated argument. 170 // TODO(leandrogracia): make use of the hardware_accelerated argument.
171 171
172 InitJNI(env, obj); 172 InitJNI(env, obj);
173 173
174 if (CommandLine::ForCurrentProcess()->HasSwitch( 174 const gfx::Display& display =
175 switches::kEnableCssTransformPinch)) { 175 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
176 dpi_scale_ = 1; 176 dpi_scale_ = display.device_scale_factor();
177 } else {
178 const gfx::Display& display =
179 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
180 dpi_scale_ = display.device_scale_factor();
181 }
182 177
183 // Currently, the only use case we have for overriding a user agent involves 178 // Currently, the only use case we have for overriding a user agent involves
184 // spoofing a desktop Linux user agent for "Request desktop site". 179 // spoofing a desktop Linux user agent for "Request desktop site".
185 // Automatically set it for all WebContents so that it is available when a 180 // Automatically set it for all WebContents so that it is available when a
186 // NavigationEntry requires the user agent to be overridden. 181 // NavigationEntry requires the user agent to be overridden.
187 const char kLinuxInfoStr[] = "X11; Linux x86_64"; 182 const char kLinuxInfoStr[] = "X11; Linux x86_64";
188 std::string product = content::GetContentClient()->GetProduct(); 183 std::string product = content::GetContentClient()->GetProduct();
189 std::string spoofed_ua = 184 std::string spoofed_ua =
190 webkit_glue::BuildUserAgentFromOSAndProduct(kLinuxInfoStr, product); 185 webkit_glue::BuildUserAgentFromOSAndProduct(kLinuxInfoStr, product);
191 web_contents->SetUserAgentOverride(spoofed_ua); 186 web_contents->SetUserAgentOverride(spoofed_ua);
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { 1380 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) {
1386 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; 1381 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!";
1387 return false; 1382 return false;
1388 } 1383 }
1389 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); 1384 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I");
1390 1385
1391 return RegisterNativesImpl(env) >= 0; 1386 return RegisterNativesImpl(env) >= 0;
1392 } 1387 }
1393 1388
1394 } // namespace content 1389 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698