| OLD | NEW |
| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 | 63 |
| 64 aura::Window* root_; | 64 aura::Window* root_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(FillLayout); | 66 DISALLOW_COPY_AND_ASSIGN(FillLayout); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace | 69 } // namespace |
| 70 | 70 |
| 71 // static | 71 // static |
| 72 CastService* CastService::Create(content::BrowserContext* browser_context) { | 72 CastService* CastService::Create( |
| 73 content::BrowserContext* browser_context, |
| 74 CastNetworkDelegate* network_delegate) { |
| 73 return new CastServiceSimple(browser_context); | 75 return new CastServiceSimple(browser_context); |
| 74 } | 76 } |
| 75 | 77 |
| 76 CastServiceSimple::CastServiceSimple(content::BrowserContext* browser_context) | 78 CastServiceSimple::CastServiceSimple(content::BrowserContext* browser_context) |
| 77 : CastService(browser_context) { | 79 : CastService(browser_context) { |
| 78 } | 80 } |
| 79 | 81 |
| 80 CastServiceSimple::~CastServiceSimple() { | 82 CastServiceSimple::~CastServiceSimple() { |
| 81 } | 83 } |
| 82 | 84 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 123 |
| 122 void CastServiceSimple::StopInternal() { | 124 void CastServiceSimple::StopInternal() { |
| 123 web_contents_->GetRenderViewHost()->ClosePage(); | 125 web_contents_->GetRenderViewHost()->ClosePage(); |
| 124 window_tree_host_.reset(); | 126 window_tree_host_.reset(); |
| 125 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); | 127 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); |
| 126 aura::Env::DeleteInstance(); | 128 aura::Env::DeleteInstance(); |
| 127 web_contents_.reset(); | 129 web_contents_.reset(); |
| 128 } | 130 } |
| 129 | 131 |
| 130 } // namespace chromecast | 132 } // namespace chromecast |
| OLD | NEW |