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

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

Issue 11087082: Adding progresss bar when loading fullscreen video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve some previous merge conflicts Created 8 years, 2 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 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.ContentVideoView;
16 import org.chromium.content.browser.ContentView; 17 import org.chromium.content.browser.ContentView;
17 import org.chromium.content.common.CommandLine; 18 import org.chromium.content.common.CommandLine;
18 import org.chromium.ui.gfx.ActivityNativeWindow; 19 import org.chromium.ui.gfx.ActivityNativeWindow;
19 20
20 /** 21 /**
21 * Activity for managing the Content Shell. 22 * Activity for managing the Content Shell.
22 */ 23 */
23 public class ContentShellActivity extends Activity { 24 public class ContentShellActivity extends Activity {
24 25
25 private static final String COMMAND_LINE_FILE = "/data/local/tmp/content-she ll-command-line"; 26 private static final String COMMAND_LINE_FILE = "/data/local/tmp/content-she ll-command-line";
(...skipping 21 matching lines...) Expand all
47 waitForDebuggerIfNeeded(); 48 waitForDebuggerIfNeeded();
48 49
49 LibraryLoader.loadAndInitSync(); 50 LibraryLoader.loadAndInitSync();
50 initializeContentViewResources(); 51 initializeContentViewResources();
51 52
52 setContentView(R.layout.content_shell_activity); 53 setContentView(R.layout.content_shell_activity);
53 mShellManager = (ShellManager) findViewById(R.id.shell_container); 54 mShellManager = (ShellManager) findViewById(R.id.shell_container);
54 mActivityNativeWindow = new ActivityNativeWindow(this); 55 mActivityNativeWindow = new ActivityNativeWindow(this);
55 mActivityNativeWindow.restoreInstanceState(savedInstanceState); 56 mActivityNativeWindow.restoreInstanceState(savedInstanceState);
56 mShellManager.setWindow(mActivityNativeWindow); 57 mShellManager.setWindow(mActivityNativeWindow);
58 ContentVideoView.registerChromeActivity(this);
57 59
58 String startupUrl = getUrlFromIntent(getIntent()); 60 String startupUrl = getUrlFromIntent(getIntent());
59 if (!TextUtils.isEmpty(startupUrl)) { 61 if (!TextUtils.isEmpty(startupUrl)) {
60 mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl)); 62 mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl));
61 } 63 }
62 64
63 if (!ContentView.enableMultiProcess(this, ContentView.MAX_RENDERERS_AUTO MATIC)) { 65 if (!ContentView.enableMultiProcess(this, ContentView.MAX_RENDERERS_AUTO MATIC)) {
64 String shellUrl = DEFAULT_SHELL_URL; 66 String shellUrl = DEFAULT_SHELL_URL;
65 if (savedInstanceState != null 67 if (savedInstanceState != null
66 && savedInstanceState.containsKey(ACTIVE_SHELL_URL_KEY)) { 68 && savedInstanceState.containsKey(ACTIVE_SHELL_URL_KEY)) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 AppResource.DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY = R.drawable.popup_zoome r_overlay; 180 AppResource.DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY = R.drawable.popup_zoome r_overlay;
179 AppResource.STRING_ACTION_BAR_SHARE = R.string.action_bar_share; 181 AppResource.STRING_ACTION_BAR_SHARE = R.string.action_bar_share;
180 AppResource.STRING_ACTION_BAR_WEB_SEARCH = R.string.action_bar_search; 182 AppResource.STRING_ACTION_BAR_WEB_SEARCH = R.string.action_bar_search;
181 AppResource.STRING_CONTENT_VIEW_CONTENT_DESCRIPTION = R.string.accessibi lity_content_view; 183 AppResource.STRING_CONTENT_VIEW_CONTENT_DESCRIPTION = R.string.accessibi lity_content_view;
182 AppResource.STRING_MEDIA_PLAYER_MESSAGE_PLAYBACK_ERROR = 184 AppResource.STRING_MEDIA_PLAYER_MESSAGE_PLAYBACK_ERROR =
183 R.string.media_player_error_text_invalid_progressive_playback; 185 R.string.media_player_error_text_invalid_progressive_playback;
184 AppResource.STRING_MEDIA_PLAYER_MESSAGE_UNKNOWN_ERROR = 186 AppResource.STRING_MEDIA_PLAYER_MESSAGE_UNKNOWN_ERROR =
185 R.string.media_player_error_text_unknown; 187 R.string.media_player_error_text_unknown;
186 AppResource.STRING_MEDIA_PLAYER_ERROR_BUTTON = R.string.media_player_err or_button; 188 AppResource.STRING_MEDIA_PLAYER_ERROR_BUTTON = R.string.media_player_err or_button;
187 AppResource.STRING_MEDIA_PLAYER_ERROR_TITLE = R.string.media_player_erro r_title; 189 AppResource.STRING_MEDIA_PLAYER_ERROR_TITLE = R.string.media_player_erro r_title;
190 AppResource.STRING_MEDIA_PLAYER_LOADING_VIDEO = R.string.media_player_lo ading_video;
188 } 191 }
189 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698