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

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

Issue 86443002: Changes to enable HTML5 autoplay for voice search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes Created 7 years 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // ContentViewCore implementation. 50 // ContentViewCore implementation.
51 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; 51 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE;
52 virtual WebContents* GetWebContents() const OVERRIDE; 52 virtual WebContents* GetWebContents() const OVERRIDE;
53 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE; 53 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE;
54 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE; 54 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE;
55 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; 55 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE;
56 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; 56 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE;
57 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; 57 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE;
58 virtual void ShowPastePopup(int x, int y) OVERRIDE; 58 virtual void ShowPastePopup(int x, int y) OVERRIDE;
59 void DisableMediaAutoplay(JNIEnv* env, jobject obj);
David Trainor- moved to gerrit 2013/11/26 18:59:32 Can this be SetMediaAutoplayEnabled()? It might b
Ted C 2013/11/26 19:24:29 Agreed. And EnableMediaAutoplay isn't exposed to
apiccion 2013/12/03 02:29:19 Done.
60 virtual void EnableMediaAutoplay();
59 virtual unsigned int GetScaledContentTexture( 61 virtual unsigned int GetScaledContentTexture(
60 float scale, 62 float scale,
61 gfx::Size* out_size) OVERRIDE; 63 gfx::Size* out_size) OVERRIDE;
62 virtual float GetDpiScale() const OVERRIDE; 64 virtual float GetDpiScale() const OVERRIDE;
63 virtual void RequestContentClipping(const gfx::Rect& clipping, 65 virtual void RequestContentClipping(const gfx::Rect& clipping,
64 const gfx::Size& content_size) OVERRIDE; 66 const gfx::Size& content_size) OVERRIDE;
65 virtual void PauseVideo() OVERRIDE; 67 virtual void PauseVideo() OVERRIDE;
66 68
67 // -------------------------------------------------------------------------- 69 // --------------------------------------------------------------------------
68 // Methods called from Java via JNI 70 // Methods called from Java via JNI
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 void DeleteScaledSnapshotTexture(); 348 void DeleteScaledSnapshotTexture();
347 349
348 void SendGestureEvent(const blink::WebGestureEvent& event); 350 void SendGestureEvent(const blink::WebGestureEvent& event);
349 351
350 // Update focus state of the RenderWidgetHostView. 352 // Update focus state of the RenderWidgetHostView.
351 void SetFocusInternal(bool focused); 353 void SetFocusInternal(bool focused);
352 354
353 // Send device_orientation_ to renderer. 355 // Send device_orientation_ to renderer.
354 void SendOrientationChangeEventInternal(); 356 void SendOrientationChangeEventInternal();
355 357
358 // Update state of media autoplay.
359 void SetMediaAutoplayEnabled(bool isEnabled);
David Trainor- moved to gerrit 2013/11/26 18:59:32 We could get rid of this if we piped through the o
apiccion 2013/12/03 02:29:19 Done.
360
356 // A weak reference to the Java ContentViewCore object. 361 // A weak reference to the Java ContentViewCore object.
357 JavaObjectWeakGlobalRef java_ref_; 362 JavaObjectWeakGlobalRef java_ref_;
358 363
359 NotificationRegistrar notification_registrar_; 364 NotificationRegistrar notification_registrar_;
360 365
361 // Reference to the current WebContents used to determine how and what to 366 // Reference to the current WebContents used to determine how and what to
362 // display in the ContentViewCore. 367 // display in the ContentViewCore.
363 WebContentsImpl* web_contents_; 368 WebContentsImpl* web_contents_;
364 369
365 // A compositor layer containing any layer that should be shown. 370 // A compositor layer containing any layer that should be shown.
(...skipping 10 matching lines...) Expand all
376 // like AutofillPopup. 381 // like AutofillPopup.
377 ui::ViewAndroid* view_android_; 382 ui::ViewAndroid* view_android_;
378 383
379 // The owning window that has a hold of main application activity. 384 // The owning window that has a hold of main application activity.
380 ui::WindowAndroid* window_android_; 385 ui::WindowAndroid* window_android_;
381 386
382 // The cache of device's current orientation set from Java side, this value 387 // The cache of device's current orientation set from Java side, this value
383 // will be sent to Renderer once it is ready. 388 // will be sent to Renderer once it is ready.
384 int device_orientation_; 389 int device_orientation_;
385 390
391 // Whether media autoplay is enabled for this content view.
392 bool is_media_autoplay_enabled_;
393
386 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 394 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
387 }; 395 };
388 396
389 bool RegisterContentViewCore(JNIEnv* env); 397 bool RegisterContentViewCore(JNIEnv* env);
390 398
391 } // namespace content 399 } // namespace content
392 400
393 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 401 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | content/browser/android/content_view_core_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698