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

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

Issue 14169011: [Android] Rename NativeWindow to WindowAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return Activity context for now Created 7 years, 8 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 27 matching lines...) Expand all
38 #include "content/public/browser/notification_source.h" 38 #include "content/public/browser/notification_source.h"
39 #include "content/public/browser/notification_types.h" 39 #include "content/public/browser/notification_types.h"
40 #include "content/public/browser/web_contents.h" 40 #include "content/public/browser/web_contents.h"
41 #include "content/public/common/content_client.h" 41 #include "content/public/common/content_client.h"
42 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
43 #include "content/public/common/page_transition_types.h" 43 #include "content/public/common/page_transition_types.h"
44 #include "jni/ContentViewCore_jni.h" 44 #include "jni/ContentViewCore_jni.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
47 #include "third_party/WebKit/Source/WebKit/chromium/public/android/WebInputEvent Factory.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/android/WebInputEvent Factory.h"
48 #include "ui/android/window_android.h"
48 #include "ui/gfx/android/java_bitmap.h" 49 #include "ui/gfx/android/java_bitmap.h"
49 #include "ui/gfx/android/window_android.h"
50 #include "ui/gfx/screen.h" 50 #include "ui/gfx/screen.h"
51 #include "ui/gfx/size_conversions.h" 51 #include "ui/gfx/size_conversions.h"
52 #include "ui/gfx/size_f.h" 52 #include "ui/gfx/size_f.h"
53 #include "webkit/glue/webmenuitem.h" 53 #include "webkit/glue/webmenuitem.h"
54 #include "webkit/user_agent/user_agent_util.h" 54 #include "webkit/user_agent/user_agent_util.h"
55 55
56 using base::android::AttachCurrentThread; 56 using base::android::AttachCurrentThread;
57 using base::android::ConvertJavaStringToUTF16; 57 using base::android::ConvertJavaStringToUTF16;
58 using base::android::ConvertJavaStringToUTF8; 58 using base::android::ConvertJavaStringToUTF8;
59 using base::android::ConvertUTF16ToJavaString; 59 using base::android::ConvertUTF16ToJavaString;
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 layer->RemoveFromParent(); 676 layer->RemoveFromParent();
677 } 677 }
678 678
679 void ContentViewCoreImpl::LoadUrl( 679 void ContentViewCoreImpl::LoadUrl(
680 NavigationController::LoadURLParams& params) { 680 NavigationController::LoadURLParams& params) {
681 GetWebContents()->GetController().LoadURLWithParams(params); 681 GetWebContents()->GetController().LoadURLWithParams(params);
682 tab_crashed_ = false; 682 tab_crashed_ = false;
683 } 683 }
684 684
685 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const { 685 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const {
686 // This should never be NULL for Chrome, but will be NULL for WebView.
687 DCHECK(window_android_);
686 return window_android_; 688 return window_android_;
687 } 689 }
688 690
689 scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const { 691 scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const {
690 return root_layer_.get(); 692 return root_layer_.get();
691 } 693 }
692 694
693 // ---------------------------------------------------------------------------- 695 // ----------------------------------------------------------------------------
694 // Methods called from Java via JNI 696 // Methods called from Java via JNI
695 // ---------------------------------------------------------------------------- 697 // ----------------------------------------------------------------------------
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 reinterpret_cast<WebContents*>(native_web_contents), 1479 reinterpret_cast<WebContents*>(native_web_contents),
1478 reinterpret_cast<ui::WindowAndroid*>(native_window)); 1480 reinterpret_cast<ui::WindowAndroid*>(native_window));
1479 return reinterpret_cast<jint>(view); 1481 return reinterpret_cast<jint>(view);
1480 } 1482 }
1481 1483
1482 bool RegisterContentViewCore(JNIEnv* env) { 1484 bool RegisterContentViewCore(JNIEnv* env) {
1483 return RegisterNativesImpl(env); 1485 return RegisterNativesImpl(env);
1484 } 1486 }
1485 1487
1486 } // namespace content 1488 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698