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

Side by Side Diff: chromecast/service/cast_service_simple.cc

Issue 606513002: Pass the system url request context getter to the cast service so that it can be used by various sy… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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/service/cast_service_simple.h" 5 #include "chromecast/service/cast_service_simple.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "net/base/filename_util.h" 12 #include "net/base/filename_util.h"
13 #include "net/url_request/url_request_context_getter.h"
13 #include "ui/aura/env.h" 14 #include "ui/aura/env.h"
14 #include "ui/aura/layout_manager.h" 15 #include "ui/aura/layout_manager.h"
15 #include "ui/aura/test/test_screen.h" 16 #include "ui/aura/test/test_screen.h"
16 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
17 #include "ui/aura/window_tree_host.h" 18 #include "ui/aura/window_tree_host.h"
18 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
19 #include "url/gurl.h" 20 #include "url/gurl.h"
20 21
21 namespace chromecast { 22 namespace chromecast {
22 23
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 63 }
63 64
64 aura::Window* root_; 65 aura::Window* root_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(FillLayout); 67 DISALLOW_COPY_AND_ASSIGN(FillLayout);
67 }; 68 };
68 69
69 } // namespace 70 } // namespace
70 71
71 // static 72 // static
72 CastService* CastService::Create(content::BrowserContext* browser_context) { 73 CastService* CastService::Create(
74 content::BrowserContext* browser_context,
75 net::URLRequestContextGetter* request_context_getter) {
73 return new CastServiceSimple(browser_context); 76 return new CastServiceSimple(browser_context);
74 } 77 }
75 78
76 CastServiceSimple::CastServiceSimple(content::BrowserContext* browser_context) 79 CastServiceSimple::CastServiceSimple(content::BrowserContext* browser_context)
77 : CastService(browser_context) { 80 : CastService(browser_context) {
78 } 81 }
79 82
80 CastServiceSimple::~CastServiceSimple() { 83 CastServiceSimple::~CastServiceSimple() {
81 } 84 }
82 85
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 124
122 void CastServiceSimple::StopInternal() { 125 void CastServiceSimple::StopInternal() {
123 web_contents_->GetRenderViewHost()->ClosePage(); 126 web_contents_->GetRenderViewHost()->ClosePage();
124 window_tree_host_.reset(); 127 window_tree_host_.reset();
125 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); 128 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL);
126 aura::Env::DeleteInstance(); 129 aura::Env::DeleteInstance();
127 web_contents_.reset(); 130 web_contents_.reset();
128 } 131 }
129 132
130 } // namespace chromecast 133 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698