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

Side by Side Diff: content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java

Issue 11412076: Create a ContentVideoViewDelegate.java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentVideoViewDelegate.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 package org.chromium.content_shell; 5 package org.chromium.content_shell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 import android.util.Log; 11 import android.util.Log;
12 import android.view.KeyEvent; 12 import android.view.KeyEvent;
13 13
14 import org.chromium.content.app.AppResource; 14 import org.chromium.content.app.AppResource;
15 import org.chromium.content.app.LibraryLoader; 15 import org.chromium.content.app.LibraryLoader;
16 import org.chromium.content.browser.AndroidContentVideoViewDelegate;
16 import org.chromium.content.browser.ContentVideoView; 17 import org.chromium.content.browser.ContentVideoView;
17 import org.chromium.content.browser.ContentView; 18 import org.chromium.content.browser.ContentView;
18 import org.chromium.content.browser.DeviceUtils; 19 import org.chromium.content.browser.DeviceUtils;
19 import org.chromium.content.common.CommandLine; 20 import org.chromium.content.common.CommandLine;
20 import org.chromium.ui.gfx.ActivityNativeWindow; 21 import org.chromium.ui.gfx.ActivityNativeWindow;
21 22
22 /** 23 /**
23 * Activity for managing the Content Shell. 24 * Activity for managing the Content Shell.
24 */ 25 */
25 public class ContentShellActivity extends Activity { 26 public class ContentShellActivity extends Activity {
(...skipping 25 matching lines...) Expand all
51 DeviceUtils.addDeviceSpecificUserAgentSwitch(this); 52 DeviceUtils.addDeviceSpecificUserAgentSwitch(this);
52 53
53 LibraryLoader.ensureInitialized(); 54 LibraryLoader.ensureInitialized();
54 initializeContentViewResources(); 55 initializeContentViewResources();
55 56
56 setContentView(R.layout.content_shell_activity); 57 setContentView(R.layout.content_shell_activity);
57 mShellManager = (ShellManager) findViewById(R.id.shell_container); 58 mShellManager = (ShellManager) findViewById(R.id.shell_container);
58 mActivityNativeWindow = new ActivityNativeWindow(this); 59 mActivityNativeWindow = new ActivityNativeWindow(this);
59 mActivityNativeWindow.restoreInstanceState(savedInstanceState); 60 mActivityNativeWindow.restoreInstanceState(savedInstanceState);
60 mShellManager.setWindow(mActivityNativeWindow); 61 mShellManager.setWindow(mActivityNativeWindow);
61 ContentVideoView.registerChromeActivity(this); 62 ContentVideoView.registerContentVideoViewDelegate(
63 new AndroidContentVideoViewDelegate(this));
qinmin 2012/11/20 21:15:40 fix indent
acleung 2012/11/23 22:56:58 Done.
62 64
63 String startupUrl = getUrlFromIntent(getIntent()); 65 String startupUrl = getUrlFromIntent(getIntent());
64 if (!TextUtils.isEmpty(startupUrl)) { 66 if (!TextUtils.isEmpty(startupUrl)) {
65 mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl)); 67 mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl));
66 } 68 }
67 69
68 if (!ContentView.enableMultiProcess(this, ContentView.MAX_RENDERERS_AUTO MATIC)) { 70 if (!ContentView.enableMultiProcess(this, ContentView.MAX_RENDERERS_AUTO MATIC)) {
69 String shellUrl = DEFAULT_SHELL_URL; 71 String shellUrl = DEFAULT_SHELL_URL;
70 if (savedInstanceState != null 72 if (savedInstanceState != null
71 && savedInstanceState.containsKey(ACTIVE_SHELL_URL_KEY)) { 73 && savedInstanceState.containsKey(ACTIVE_SHELL_URL_KEY)) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 AppResource.STRING_CONTENT_VIEW_CONTENT_DESCRIPTION = R.string.accessibi lity_content_view; 188 AppResource.STRING_CONTENT_VIEW_CONTENT_DESCRIPTION = R.string.accessibi lity_content_view;
187 AppResource.STRING_MEDIA_PLAYER_MESSAGE_PLAYBACK_ERROR = 189 AppResource.STRING_MEDIA_PLAYER_MESSAGE_PLAYBACK_ERROR =
188 R.string.media_player_error_text_invalid_progressive_playback; 190 R.string.media_player_error_text_invalid_progressive_playback;
189 AppResource.STRING_MEDIA_PLAYER_MESSAGE_UNKNOWN_ERROR = 191 AppResource.STRING_MEDIA_PLAYER_MESSAGE_UNKNOWN_ERROR =
190 R.string.media_player_error_text_unknown; 192 R.string.media_player_error_text_unknown;
191 AppResource.STRING_MEDIA_PLAYER_ERROR_BUTTON = R.string.media_player_err or_button; 193 AppResource.STRING_MEDIA_PLAYER_ERROR_BUTTON = R.string.media_player_err or_button;
192 AppResource.STRING_MEDIA_PLAYER_ERROR_TITLE = R.string.media_player_erro r_title; 194 AppResource.STRING_MEDIA_PLAYER_ERROR_TITLE = R.string.media_player_erro r_title;
193 AppResource.STRING_MEDIA_PLAYER_LOADING_VIDEO = R.string.media_player_lo ading_video; 195 AppResource.STRING_MEDIA_PLAYER_LOADING_VIDEO = R.string.media_player_lo ading_video;
194 } 196 }
195 } 197 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentVideoViewDelegate.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698