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

Side by Side Diff: chrome/browser/android/content_view_util.cc

Issue 10831060: Refactor the Android port to allow access to the chrome layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit fixed. Created 8 years, 4 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 | « chrome/browser/android/content_view_util.h ('k') | chrome/browser/component/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/content_view_util.h"
6
7 #include "base/android/jni_android.h"
8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "content/public/browser/web_contents.h"
12 #include "ipc/ipc_message.h"
13 #include "jni/ContentViewUtil_jni.h"
14
15 static jint CreateNativeWebContents(
16 JNIEnv* env, jclass clazz, jboolean incognito) {
17 Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile();
18 if (incognito)
19 profile = profile->GetOffTheRecordProfile();
20
21 content::WebContents* web_contents =
22 content::WebContents::Create(profile, 0, MSG_ROUTING_NONE, 0);
23 return reinterpret_cast<jint>(web_contents);
24 }
25
26 bool RegisterContentViewUtil(JNIEnv* env) {
27 return RegisterNativesImpl(env);
28 }
29
OLDNEW
« no previous file with comments | « chrome/browser/android/content_view_util.h ('k') | chrome/browser/component/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698