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

Side by Side Diff: chromecast/shell/app/cast_main_delegate.cc

Issue 469023004: Chromecast: moves cast_shell.pak output to assets/ directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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
« chromecast/chromecast.gyp ('K') | « chromecast/common/cast_paths.cc ('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 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/shell/app/cast_main_delegate.h" 5 #include "chromecast/shell/app/cast_main_delegate.h"
6 6
7 #include "base/base_paths.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "base/path_service.h" 8 #include "base/path_service.h"
10 #include "chromecast/common/cast_paths.h" 9 #include "chromecast/common/cast_paths.h"
11 #include "chromecast/common/cast_resource_delegate.h" 10 #include "chromecast/common/cast_resource_delegate.h"
12 #include "chromecast/shell/browser/cast_content_browser_client.h" 11 #include "chromecast/shell/browser/cast_content_browser_client.h"
13 #include "chromecast/shell/renderer/cast_content_renderer_client.h" 12 #include "chromecast/shell/renderer/cast_content_renderer_client.h"
14 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
15 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
16 15
17 namespace chromecast { 16 namespace chromecast {
(...skipping 27 matching lines...) Expand all
45 44
46 void CastMainDelegate::InitializeResourceBundle() { 45 void CastMainDelegate::InitializeResourceBundle() {
47 resource_delegate_.reset(new CastResourceDelegate()); 46 resource_delegate_.reset(new CastResourceDelegate());
48 // TODO(gunsch): Use LOAD_COMMON_RESOURCES once ResourceBundle no longer 47 // TODO(gunsch): Use LOAD_COMMON_RESOURCES once ResourceBundle no longer
49 // hardcodes resource file names. 48 // hardcodes resource file names.
50 ui::ResourceBundle::InitSharedInstanceWithLocale( 49 ui::ResourceBundle::InitSharedInstanceWithLocale(
51 "en-US", 50 "en-US",
52 resource_delegate_.get(), 51 resource_delegate_.get(),
53 ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); 52 ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
54 53
55 base::FilePath pak_dir; 54 base::FilePath pak_file;
56 PathService::Get(base::DIR_MODULE, &pak_dir); 55 CHECK(PathService::Get(FILE_CAST_PAK, &pak_file));
57 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( 56 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
58 pak_dir.Append(FILE_PATH_LITERAL("cast_shell.pak")), 57 pak_file,
59 ui::SCALE_FACTOR_NONE); 58 ui::SCALE_FACTOR_NONE);
60 } 59 }
61 60
62 content::ContentBrowserClient* CastMainDelegate::CreateContentBrowserClient() { 61 content::ContentBrowserClient* CastMainDelegate::CreateContentBrowserClient() {
63 browser_client_.reset(new CastContentBrowserClient); 62 browser_client_.reset(new CastContentBrowserClient);
64 return browser_client_.get(); 63 return browser_client_.get();
65 } 64 }
66 65
67 content::ContentRendererClient* 66 content::ContentRendererClient*
68 CastMainDelegate::CreateContentRendererClient() { 67 CastMainDelegate::CreateContentRendererClient() {
69 renderer_client_.reset(new CastContentRendererClient); 68 renderer_client_.reset(new CastContentRendererClient);
70 return renderer_client_.get(); 69 return renderer_client_.get();
71 } 70 }
72 71
73 } // namespace shell 72 } // namespace shell
74 } // namespace chromecast 73 } // namespace chromecast
OLDNEW
« chromecast/chromecast.gyp ('K') | « chromecast/common/cast_paths.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698