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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1972433002: [Chromecast] Handle device scale factor correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simpler approach after offline discussion with alokp Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 prefs->allow_scripts_to_close_windows = true; 269 prefs->allow_scripts_to_close_windows = true;
270 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default 270 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default
271 // because some content providers such as YouTube use plain http requests 271 // because some content providers such as YouTube use plain http requests
272 // to retrieve media data chunks while running in a https page. This pref 272 // to retrieve media data chunks while running in a https page. This pref
273 // should be disabled once all the content providers are no longer doing that. 273 // should be disabled once all the content providers are no longer doing that.
274 prefs->allow_running_insecure_content = true; 274 prefs->allow_running_insecure_content = true;
275 275
276 // Enable 5% margins for WebVTT cues to keep within title-safe area 276 // Enable 5% margins for WebVTT cues to keep within title-safe area
277 prefs->text_track_margin_percentage = 5; 277 prefs->text_track_margin_percentage = 5;
278 278
279 #if defined(OS_ANDROID) 279 #if !defined(OS_ANDROID)
alokp 2016/05/11 21:48:47 You might want to just set viewport_enabled and vi
280 // Viewport is only enabled by default on Android; we use it consistently
281 // across all platforms.
282 prefs->viewport_enabled = true;
283 prefs->viewport_meta_enabled = true;
284 #endif
285
280 // Enable the television style for viewport so that all cast apps have a 286 // Enable the television style for viewport so that all cast apps have a
281 // 1280px wide layout viewport by default. 287 // 1280px wide layout viewport by default.
282 DCHECK(prefs->viewport_enabled); 288 DCHECK(prefs->viewport_enabled);
283 DCHECK(prefs->viewport_meta_enabled); 289 DCHECK(prefs->viewport_meta_enabled);
284 prefs->viewport_style = content::ViewportStyle::TELEVISION; 290 prefs->viewport_style = content::ViewportStyle::TELEVISION;
285 #endif // defined(OS_ANDROID)
286 } 291 }
287 292
288 void CastContentBrowserClient::ResourceDispatcherHostCreated() { 293 void CastContentBrowserClient::ResourceDispatcherHostCreated() {
289 CastBrowserProcess::GetInstance()->SetResourceDispatcherHostDelegate( 294 CastBrowserProcess::GetInstance()->SetResourceDispatcherHostDelegate(
290 base::WrapUnique(new CastResourceDispatcherHostDelegate)); 295 base::WrapUnique(new CastResourceDispatcherHostDelegate));
291 content::ResourceDispatcherHost::Get()->SetDelegate( 296 content::ResourceDispatcherHost::Get()->SetDelegate(
292 CastBrowserProcess::GetInstance()->resource_dispatcher_host_delegate()); 297 CastBrowserProcess::GetInstance()->resource_dispatcher_host_delegate());
293 } 298 }
294 299
295 std::string CastContentBrowserClient::GetApplicationLocale() { 300 std::string CastContentBrowserClient::GetApplicationLocale() {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 process_type, dumps_path, false /* upload */); 514 process_type, dumps_path, false /* upload */);
510 // StartUploaderThread() even though upload is diferred. 515 // StartUploaderThread() even though upload is diferred.
511 // Breakpad-related memory is freed in the uploader thread. 516 // Breakpad-related memory is freed in the uploader thread.
512 crash_handler->StartUploaderThread(); 517 crash_handler->StartUploaderThread();
513 return crash_handler; 518 return crash_handler;
514 } 519 }
515 #endif // !defined(OS_ANDROID) 520 #endif // !defined(OS_ANDROID)
516 521
517 } // namespace shell 522 } // namespace shell
518 } // namespace chromecast 523 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698