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

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

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new android code 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
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 web_contents_(static_cast<WebContentsImpl*>(web_contents)), 90 web_contents_(static_cast<WebContentsImpl*>(web_contents)),
91 tab_crashed_(false), 91 tab_crashed_(false),
92 window_android_(window_android) { 92 window_android_(window_android) {
93 DCHECK(web_contents) << 93 DCHECK(web_contents) <<
94 "A ContentViewCoreImpl should be created with a valid WebContents."; 94 "A ContentViewCoreImpl should be created with a valid WebContents.";
95 95
96 // TODO(leandrogracia): make use of the hardware_accelerated argument. 96 // TODO(leandrogracia): make use of the hardware_accelerated argument.
97 97
98 InitJNI(env, obj); 98 InitJNI(env, obj);
99 99
100 if (!gfx::Screen::IsDIPEnabled()) { 100 if (!gfx::Screen::GetNativeScreen()->IsDIPEnabled()) {
101 dpi_scale_ = 1; 101 dpi_scale_ = 1;
102 } else { 102 } else {
103 scoped_ptr<content::DeviceInfo> device_info(new content::DeviceInfo()); 103 scoped_ptr<content::DeviceInfo> device_info(new content::DeviceInfo());
104 dpi_scale_ = device_info->GetDPIScale(); 104 dpi_scale_ = device_info->GetDPIScale();
105 } 105 }
106 106
107 notification_registrar_.Add(this, 107 notification_registrar_.Add(this,
108 NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, 108 NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
109 NotificationService::AllSources()); 109 NotificationService::AllSources());
110 110
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { 926 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) {
927 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; 927 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!";
928 return false; 928 return false;
929 } 929 }
930 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); 930 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I");
931 931
932 return RegisterNativesImpl(env) >= 0; 932 return RegisterNativesImpl(env) >= 0;
933 } 933 }
934 934
935 } // namespace content 935 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698