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

Side by Side Diff: headless/lib/browser/headless_web_contents_impl.cc

Issue 2778983002: Fix browser tests on Mac (Closed)
Patch Set: nit change on #if defined on DefaultSizes test Created 3 years, 8 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
« no previous file with comments | « no previous file | headless/lib/headless_browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "headless/lib/browser/headless_web_contents_impl.h" 5 #include "headless/lib/browser/headless_web_contents_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 } 198 }
199 199
200 bool HeadlessWebContentsImpl::OpenURL(const GURL& url) { 200 bool HeadlessWebContentsImpl::OpenURL(const GURL& url) {
201 if (!url.is_valid()) 201 if (!url.is_valid())
202 return false; 202 return false;
203 content::NavigationController::LoadURLParams params(url); 203 content::NavigationController::LoadURLParams params(url);
204 params.transition_type = ui::PageTransitionFromInt( 204 params.transition_type = ui::PageTransitionFromInt(
205 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 205 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
206 web_contents_->GetController().LoadURLWithParams(params); 206 web_contents_->GetController().LoadURLWithParams(params);
207 web_contents_delegate_->ActivateContents(web_contents_.get());
207 web_contents_->Focus(); 208 web_contents_->Focus();
208 return true; 209 return true;
209 } 210 }
210 211
211 void HeadlessWebContentsImpl::Close() { 212 void HeadlessWebContentsImpl::Close() {
212 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 213 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
213 browser_context()->DestroyWebContents(this); 214 browser_context()->DestroyWebContents(this);
214 } 215 }
215 216
216 std::string HeadlessWebContentsImpl::GetDevToolsAgentHostId() { 217 std::string HeadlessWebContentsImpl::GetDevToolsAgentHostId() {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 HeadlessWebContents::Builder::MojoService::MojoService() {} 319 HeadlessWebContents::Builder::MojoService::MojoService() {}
319 320
320 HeadlessWebContents::Builder::MojoService::MojoService( 321 HeadlessWebContents::Builder::MojoService::MojoService(
321 const std::string& service_name, 322 const std::string& service_name,
322 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) 323 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory)
323 : service_name(service_name), service_factory(service_factory) {} 324 : service_name(service_name), service_factory(service_factory) {}
324 325
325 HeadlessWebContents::Builder::MojoService::~MojoService() {} 326 HeadlessWebContents::Builder::MojoService::~MojoService() {}
326 327
327 } // namespace headless 328 } // namespace headless
OLDNEW
« no previous file with comments | « no previous file | headless/lib/headless_browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698