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

Side by Side Diff: chrome/browser/extensions/extension_webnavigation_api.cc

Issue 8784006: Replace the GURL referrer field of OpenURLParams with a content::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
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 // Implements the Chrome Extensions WebNavigation API. 5 // Implements the Chrome Extensions WebNavigation API.
6 6
7 #include "chrome/browser/extensions/extension_webnavigation_api.h" 7 #include "chrome/browser/extensions/extension_webnavigation_api.h"
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 DCHECK_EQ(navigation_state_.IsMainFrame(frame_id), is_main_frame); 581 DCHECK_EQ(navigation_state_.IsMainFrame(frame_id), is_main_frame);
582 DispatchOnCompleted(tab_contents(), 582 DispatchOnCompleted(tab_contents(),
583 validated_url, 583 validated_url,
584 is_main_frame, 584 is_main_frame,
585 frame_id); 585 frame_id);
586 } 586 }
587 587
588 void ExtensionWebNavigationTabObserver::DidOpenRequestedURL( 588 void ExtensionWebNavigationTabObserver::DidOpenRequestedURL(
589 TabContents* new_contents, 589 TabContents* new_contents,
590 const GURL& url, 590 const GURL& url,
591 const GURL& referrer, 591 const content::Referrer& referrer,
592 WindowOpenDisposition disposition, 592 WindowOpenDisposition disposition,
593 content::PageTransition transition, 593 content::PageTransition transition,
594 int64 source_frame_id) { 594 int64 source_frame_id) {
595 if (!navigation_state_.CanSendEvents(source_frame_id)) 595 if (!navigation_state_.CanSendEvents(source_frame_id))
596 return; 596 return;
597 597
598 // We only send the onCreatedNavigationTarget if we end up creating a new 598 // We only send the onCreatedNavigationTarget if we end up creating a new
599 // window. 599 // window.
600 if (disposition != SINGLETON_TAB && 600 if (disposition != SINGLETON_TAB &&
601 disposition != NEW_FOREGROUND_TAB && 601 disposition != NEW_FOREGROUND_TAB &&
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 keys::kFrameIdKey, 728 keys::kFrameIdKey,
729 GetFrameId(navigation_state.IsMainFrame(*frame), *frame)); 729 GetFrameId(navigation_state.IsMainFrame(*frame), *frame));
730 frameDict->SetBoolean( 730 frameDict->SetBoolean(
731 keys::kErrorOccurredKey, 731 keys::kErrorOccurredKey,
732 navigation_state.GetErrorOccurredInFrame(*frame)); 732 navigation_state.GetErrorOccurredInFrame(*frame));
733 resultList->Append(frameDict); 733 resultList->Append(frameDict);
734 } 734 }
735 result_.reset(resultList); 735 result_.reset(resultList);
736 return true; 736 return true;
737 } 737 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webnavigation_api.h ('k') | chrome/browser/extensions/webstore_inline_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698