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

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

Issue 1370603002: Make some global pointers const void* const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Popup item is enabled 81 // Popup item is enabled
82 POPUP_ITEM_TYPE_ENABLED, 82 POPUP_ITEM_TYPE_ENABLED,
83 }; 83 };
84 84
85 } //namespace 85 } //namespace
86 86
87 namespace content { 87 namespace content {
88 88
89 namespace { 89 namespace {
90 90
91 const void* kContentViewUserDataKey = &kContentViewUserDataKey; 91 const void* const kContentViewUserDataKey = &kContentViewUserDataKey;
92 92
93 int GetRenderProcessIdFromRenderViewHost(RenderViewHost* host) { 93 int GetRenderProcessIdFromRenderViewHost(RenderViewHost* host) {
94 DCHECK(host); 94 DCHECK(host);
95 RenderProcessHost* render_process = host->GetProcess(); 95 RenderProcessHost* render_process = host->GetProcess();
96 DCHECK(render_process); 96 DCHECK(render_process);
97 if (render_process->HasConnection()) 97 if (render_process->HasConnection())
98 return render_process->GetHandle(); 98 return render_process->GetHandle();
99 else 99 return 0;
100 return 0;
101 } 100 }
102 101
103 ScopedJavaLocalRef<jobject> CreateJavaRect( 102 ScopedJavaLocalRef<jobject> CreateJavaRect(
104 JNIEnv* env, 103 JNIEnv* env,
105 const gfx::Rect& rect) { 104 const gfx::Rect& rect) {
106 return ScopedJavaLocalRef<jobject>( 105 return ScopedJavaLocalRef<jobject>(
107 Java_ContentViewCore_createRect(env, 106 Java_ContentViewCore_createRect(env,
108 static_cast<int>(rect.x()), 107 static_cast<int>(rect.x()),
109 static_cast<int>(rect.y()), 108 static_cast<int>(rect.y()),
110 static_cast<int>(rect.right()), 109 static_cast<int>(rect.right()),
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 return ScopedJavaLocalRef<jobject>(); 1451 return ScopedJavaLocalRef<jobject>();
1453 1452
1454 return view->GetJavaObject(); 1453 return view->GetJavaObject();
1455 } 1454 }
1456 1455
1457 bool RegisterContentViewCore(JNIEnv* env) { 1456 bool RegisterContentViewCore(JNIEnv* env) {
1458 return RegisterNativesImpl(env); 1457 return RegisterNativesImpl(env);
1459 } 1458 }
1460 1459
1461 } // namespace content 1460 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698