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

Side by Side Diff: chrome/browser/automation/automation_provider_win.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 view_host->routing_id(), message, origin, target)); 361 view_host->routing_id(), message, origin, target));
362 } 362 }
363 363
364 void AutomationProvider::NavigateInExternalTab( 364 void AutomationProvider::NavigateInExternalTab(
365 int handle, const GURL& url, const GURL& referrer, 365 int handle, const GURL& url, const GURL& referrer,
366 AutomationMsg_NavigationResponseValues* status) { 366 AutomationMsg_NavigationResponseValues* status) {
367 *status = AUTOMATION_MSG_NAVIGATION_ERROR; 367 *status = AUTOMATION_MSG_NAVIGATION_ERROR;
368 368
369 if (tab_tracker_->ContainsHandle(handle)) { 369 if (tab_tracker_->ContainsHandle(handle)) {
370 NavigationController* tab = tab_tracker_->GetResource(handle); 370 NavigationController* tab = tab_tracker_->GetResource(handle);
371 tab->LoadURL(url, referrer, content::PAGE_TRANSITION_TYPED, std::string()); 371 tab->LoadURL(
372 url,
373 content::Referrer(referrer, WebKit::WebReferrerPolicyDefault),
374 content::PAGE_TRANSITION_TYPED, std::string());
372 *status = AUTOMATION_MSG_NAVIGATION_SUCCESS; 375 *status = AUTOMATION_MSG_NAVIGATION_SUCCESS;
373 } 376 }
374 } 377 }
375 378
376 void AutomationProvider::NavigateExternalTabAtIndex( 379 void AutomationProvider::NavigateExternalTabAtIndex(
377 int handle, int navigation_index, 380 int handle, int navigation_index,
378 AutomationMsg_NavigationResponseValues* status) { 381 AutomationMsg_NavigationResponseValues* status) {
379 *status = AUTOMATION_MSG_NAVIGATION_ERROR; 382 *status = AUTOMATION_MSG_NAVIGATION_ERROR;
380 383
381 if (tab_tracker_->ContainsHandle(handle)) { 384 if (tab_tracker_->ContainsHandle(handle)) {
(...skipping 14 matching lines...) Expand all
396 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) { 399 void AutomationProvider::OnSetZoomLevel(int handle, int zoom_level) {
397 if (tab_tracker_->ContainsHandle(handle)) { 400 if (tab_tracker_->ContainsHandle(handle)) {
398 NavigationController* tab = tab_tracker_->GetResource(handle); 401 NavigationController* tab = tab_tracker_->GetResource(handle);
399 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) { 402 if (tab->tab_contents() && tab->tab_contents()->render_view_host()) {
400 RenderViewHost* host = tab->tab_contents()->render_view_host(); 403 RenderViewHost* host = tab->tab_contents()->render_view_host();
401 content::PageZoom zoom = static_cast<content::PageZoom>(zoom_level); 404 content::PageZoom zoom = static_cast<content::PageZoom>(zoom_level);
402 host->Zoom(zoom); 405 host->Zoom(zoom);
403 } 406 }
404 } 407 }
405 } 408 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698