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

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

Issue 58203002: Android: remove ContentViewCore from the renderer crash codepath. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 1 month 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 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 jint ua_override_option, 82 jint ua_override_option,
83 jstring extra_headers, 83 jstring extra_headers,
84 jbyteArray post_data, 84 jbyteArray post_data,
85 jstring base_url_for_data_url, 85 jstring base_url_for_data_url,
86 jstring virtual_url_for_data_url, 86 jstring virtual_url_for_data_url,
87 jboolean can_load_local_resources); 87 jboolean can_load_local_resources);
88 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const; 88 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const;
89 base::android::ScopedJavaLocalRef<jstring> GetTitle( 89 base::android::ScopedJavaLocalRef<jstring> GetTitle(
90 JNIEnv* env, jobject obj) const; 90 JNIEnv* env, jobject obj) const;
91 jboolean IsIncognito(JNIEnv* env, jobject obj); 91 jboolean IsIncognito(JNIEnv* env, jobject obj);
92 jboolean Crashed(JNIEnv* env, jobject obj) const { return tab_crashed_; }
93 void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation); 92 void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation);
94 jboolean SendTouchEvent(JNIEnv* env, 93 jboolean SendTouchEvent(JNIEnv* env,
95 jobject obj, 94 jobject obj,
96 jlong time_ms, 95 jlong time_ms,
97 jint type, 96 jint type,
98 jobjectArray pts); 97 jobjectArray pts);
99 jboolean SendMouseMoveEvent(JNIEnv* env, 98 jboolean SendMouseMoveEvent(JNIEnv* env,
100 jobject obj, 99 jobject obj,
101 jlong time_ms, 100 jlong time_ms,
102 jfloat x, 101 jfloat x,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 337
339 void SendBeginFrame(base::TimeTicks frame_time); 338 void SendBeginFrame(base::TimeTicks frame_time);
340 339
341 gfx::Size GetViewportSizePix() const; 340 gfx::Size GetViewportSizePix() const;
342 gfx::Size GetViewportSizeOffsetPix() const; 341 gfx::Size GetViewportSizeOffsetPix() const;
343 342
344 void DeleteScaledSnapshotTexture(); 343 void DeleteScaledSnapshotTexture();
345 344
346 void SendGestureEvent(const WebKit::WebGestureEvent& event); 345 void SendGestureEvent(const WebKit::WebGestureEvent& event);
347 346
348 // Checks if there there is a corresponding renderer process and updates
349 // |tab_crashed_| accordingly.
350 void UpdateTabCrashedFlag();
351
352 // Update focus state of the RenderWidgetHostView. 347 // Update focus state of the RenderWidgetHostView.
353 void SetFocusInternal(bool focused); 348 void SetFocusInternal(bool focused);
354 349
355 // Send device_orientation_ to renderer. 350 // Send device_orientation_ to renderer.
356 void SendOrientationChangeEventInternal(); 351 void SendOrientationChangeEventInternal();
357 352
358 // A weak reference to the Java ContentViewCore object. 353 // A weak reference to the Java ContentViewCore object.
359 JavaObjectWeakGlobalRef java_ref_; 354 JavaObjectWeakGlobalRef java_ref_;
360 355
361 NotificationRegistrar notification_registrar_; 356 NotificationRegistrar notification_registrar_;
362 357
363 // Reference to the current WebContents used to determine how and what to 358 // Reference to the current WebContents used to determine how and what to
364 // display in the ContentViewCore. 359 // display in the ContentViewCore.
365 WebContentsImpl* web_contents_; 360 WebContentsImpl* web_contents_;
366 361
367 // A compositor layer containing any layer that should be shown. 362 // A compositor layer containing any layer that should be shown.
368 scoped_refptr<cc::Layer> root_layer_; 363 scoped_refptr<cc::Layer> root_layer_;
369 364
370 // Whether the renderer backing this ContentViewCore has crashed.
371 bool tab_crashed_;
372
373 // Device scale factor. 365 // Device scale factor.
374 float dpi_scale_; 366 float dpi_scale_;
375 367
376 // Variables used to keep track of frame timestamps and deadlines. 368 // Variables used to keep track of frame timestamps and deadlines.
377 base::TimeDelta vsync_interval_; 369 base::TimeDelta vsync_interval_;
378 base::TimeDelta expected_browser_composite_time_; 370 base::TimeDelta expected_browser_composite_time_;
379 371
380 // The Android view that can be used to add and remove decoration layers 372 // The Android view that can be used to add and remove decoration layers
381 // like AutofillPopup. 373 // like AutofillPopup.
382 ui::ViewAndroid* view_android_; 374 ui::ViewAndroid* view_android_;
383 375
384 // The owning window that has a hold of main application activity. 376 // The owning window that has a hold of main application activity.
385 ui::WindowAndroid* window_android_; 377 ui::WindowAndroid* window_android_;
386 378
387 // The cache of device's current orientation set from Java side, this value 379 // The cache of device's current orientation set from Java side, this value
388 // will be sent to Renderer once it is ready. 380 // will be sent to Renderer once it is ready.
389 int device_orientation_; 381 int device_orientation_;
390 382
391 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 383 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
392 }; 384 };
393 385
394 bool RegisterContentViewCore(JNIEnv* env); 386 bool RegisterContentViewCore(JNIEnv* env);
395 387
396 } // namespace content 388 } // namespace content
397 389
398 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 390 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698