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

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: Finish Renaming 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 renderer_frame_pending_ = true; 671 renderer_frame_pending_ = true;
672 } 672 }
673 673
674 void ContentViewCoreImpl::LoadUrl( 674 void ContentViewCoreImpl::LoadUrl(
675 NavigationController::LoadURLParams& params) { 675 NavigationController::LoadURLParams& params) {
676 GetWebContents()->GetController().LoadURLWithParams(params); 676 GetWebContents()->GetController().LoadURLWithParams(params);
677 tab_crashed_ = false; 677 tab_crashed_ = false;
678 } 678 }
679 679
680 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const { 680 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const {
681 // This should never be NULL for Chrome, but will be NULL for WebView.
682 DCHECK(window_android_);
681 return window_android_; 683 return window_android_;
682 } 684 }
683 685
684 scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const { 686 scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const {
685 return root_layer_.get(); 687 return root_layer_.get();
686 } 688 }
687 689
688 // ---------------------------------------------------------------------------- 690 // ----------------------------------------------------------------------------
689 // Methods called from Java via JNI 691 // Methods called from Java via JNI
690 // ---------------------------------------------------------------------------- 692 // ----------------------------------------------------------------------------
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 reinterpret_cast<WebContents*>(native_web_contents), 1481 reinterpret_cast<WebContents*>(native_web_contents),
1480 reinterpret_cast<ui::WindowAndroid*>(native_window)); 1482 reinterpret_cast<ui::WindowAndroid*>(native_window));
1481 return reinterpret_cast<jint>(view); 1483 return reinterpret_cast<jint>(view);
1482 } 1484 }
1483 1485
1484 bool RegisterContentViewCore(JNIEnv* env) { 1486 bool RegisterContentViewCore(JNIEnv* env) {
1485 return RegisterNativesImpl(env); 1487 return RegisterNativesImpl(env);
1486 } 1488 }
1487 1489
1488 } // namespace content 1490 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698