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

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: rebase Created 5 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
« no previous file with comments | « components/navigation_interception/intercept_navigation_delegate.cc ('k') | tools/gn/loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Popup item is of type group 78 // Popup item is of type group
79 POPUP_ITEM_TYPE_GROUP, 79 POPUP_ITEM_TYPE_GROUP,
80 80
81 // Popup item is disabled 81 // Popup item is disabled
82 POPUP_ITEM_TYPE_DISABLED, 82 POPUP_ITEM_TYPE_DISABLED,
83 83
84 // Popup item is enabled 84 // Popup item is enabled
85 POPUP_ITEM_TYPE_ENABLED, 85 POPUP_ITEM_TYPE_ENABLED,
86 }; 86 };
87 87
88 const void* kContentViewUserDataKey = &kContentViewUserDataKey; 88 const void* const kContentViewUserDataKey = &kContentViewUserDataKey;
89 89
90 int GetRenderProcessIdFromRenderViewHost(RenderViewHost* host) { 90 int GetRenderProcessIdFromRenderViewHost(RenderViewHost* host) {
91 DCHECK(host); 91 DCHECK(host);
92 RenderProcessHost* render_process = host->GetProcess(); 92 RenderProcessHost* render_process = host->GetProcess();
93 DCHECK(render_process); 93 DCHECK(render_process);
94 if (render_process->HasConnection()) 94 if (render_process->HasConnection())
95 return render_process->GetHandle(); 95 return render_process->GetHandle();
96 else 96 return 0;
97 return 0;
98 } 97 }
99 98
100 ScopedJavaLocalRef<jobject> CreateJavaRect( 99 ScopedJavaLocalRef<jobject> CreateJavaRect(
101 JNIEnv* env, 100 JNIEnv* env,
102 const gfx::Rect& rect) { 101 const gfx::Rect& rect) {
103 return ScopedJavaLocalRef<jobject>( 102 return ScopedJavaLocalRef<jobject>(
104 Java_ContentViewCore_createRect(env, 103 Java_ContentViewCore_createRect(env,
105 static_cast<int>(rect.x()), 104 static_cast<int>(rect.x()),
106 static_cast<int>(rect.y()), 105 static_cast<int>(rect.y()),
107 static_cast<int>(rect.right()), 106 static_cast<int>(rect.right()),
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 return ScopedJavaLocalRef<jobject>(); 1448 return ScopedJavaLocalRef<jobject>();
1450 1449
1451 return view->GetJavaObject(); 1450 return view->GetJavaObject();
1452 } 1451 }
1453 1452
1454 bool RegisterContentViewCore(JNIEnv* env) { 1453 bool RegisterContentViewCore(JNIEnv* env) {
1455 return RegisterNativesImpl(env); 1454 return RegisterNativesImpl(env);
1456 } 1455 }
1457 1456
1458 } // namespace content 1457 } // namespace content
OLDNEW
« no previous file with comments | « components/navigation_interception/intercept_navigation_delegate.cc ('k') | tools/gn/loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698