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

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

Issue 1094153002: Move ClosePage() from RenderViewHost to WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromecast android compile failure. Created 5 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/service/cast_service_simple.h" 5 #include "chromecast/browser/service/cast_service_simple.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chromecast/browser/cast_content_window.h" 8 #include "chromecast/browser/cast_content_window.h"
9 #include "content/public/browser/render_view_host.h" 9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 window_.reset(new CastContentWindow); 66 window_.reset(new CastContentWindow);
67 web_contents_ = window_->CreateWebContents(initial_size, browser_context()); 67 web_contents_ = window_->CreateWebContents(initial_size, browser_context());
68 window_->CreateWindowTree(initial_size, web_contents_.get()); 68 window_->CreateWindowTree(initial_size, web_contents_.get());
69 69
70 web_contents_->GetController().LoadURL(startup_url_, content::Referrer(), 70 web_contents_->GetController().LoadURL(startup_url_, content::Referrer(),
71 ui::PAGE_TRANSITION_TYPED, 71 ui::PAGE_TRANSITION_TYPED,
72 std::string()); 72 std::string());
73 } 73 }
74 74
75 void CastServiceSimple::StopInternal() { 75 void CastServiceSimple::StopInternal() {
76 web_contents_->GetRenderViewHost()->ClosePage(); 76 web_contents_->ClosePage();
77 web_contents_.reset(); 77 web_contents_.reset();
78 window_.reset(); 78 window_.reset();
79 } 79 }
80 80
81 } // namespace chromecast 81 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/android/cast_window_android.cc ('k') | content/browser/devtools/render_frame_devtools_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698