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

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

Issue 608093002: Chromecast: adds callback for CastService to control metrics state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cast-network-delegate
Patch Set: rebase 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"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 DISALLOW_COPY_AND_ASSIGN(FillLayout); 67 DISALLOW_COPY_AND_ASSIGN(FillLayout);
68 }; 68 };
69 69
70 } // namespace 70 } // namespace
71 71
72 // static 72 // static
73 CastService* CastService::Create( 73 CastService* CastService::Create(
74 content::BrowserContext* browser_context, 74 content::BrowserContext* browser_context,
75 net::URLRequestContextGetter* request_context_getter, 75 net::URLRequestContextGetter* request_context_getter,
76 shell::CastNetworkDelegate* network_delegate) { 76 shell::CastNetworkDelegate* network_delegate,
77 return new CastServiceSimple(browser_context); 77 const OptInStatsChangedCallback& opt_in_stats_callback) {
78 return new CastServiceSimple(browser_context, opt_in_stats_callback);
78 } 79 }
79 80
80 CastServiceSimple::CastServiceSimple(content::BrowserContext* browser_context) 81 CastServiceSimple::CastServiceSimple(
81 : CastService(browser_context) { 82 content::BrowserContext* browser_context,
83 const OptInStatsChangedCallback& opt_in_stats_callback)
84 : CastService(browser_context, opt_in_stats_callback) {
82 } 85 }
83 86
84 CastServiceSimple::~CastServiceSimple() { 87 CastServiceSimple::~CastServiceSimple() {
85 } 88 }
86 89
87 void CastServiceSimple::Initialize() { 90 void CastServiceSimple::Initialize() {
88 } 91 }
89 92
90 void CastServiceSimple::StartInternal() { 93 void CastServiceSimple::StartInternal() {
91 // Aura initialization 94 // Aura initialization
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 128
126 void CastServiceSimple::StopInternal() { 129 void CastServiceSimple::StopInternal() {
127 web_contents_->GetRenderViewHost()->ClosePage(); 130 web_contents_->GetRenderViewHost()->ClosePage();
128 window_tree_host_.reset(); 131 window_tree_host_.reset();
129 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); 132 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL);
130 aura::Env::DeleteInstance(); 133 aura::Env::DeleteInstance();
131 web_contents_.reset(); 134 web_contents_.reset();
132 } 135 }
133 136
134 } // namespace chromecast 137 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/service/cast_service_simple.h ('k') | chromecast/shell/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698