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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 10091006: TabContents -> WebContentsImpl, part 15. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/api/web_navigation/web_navigation_api.h" 7 #include "chrome/browser/extensions/api/web_navigation/web_navigation_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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 void WebNavigationEventRouter::Retargeting(const RetargetingDetails* details) { 442 void WebNavigationEventRouter::Retargeting(const RetargetingDetails* details) {
443 if (details->source_frame_id == 0) 443 if (details->source_frame_id == 0)
444 return; 444 return;
445 WebNavigationTabObserver* tab_observer = 445 WebNavigationTabObserver* tab_observer =
446 WebNavigationTabObserver::Get(details->source_web_contents); 446 WebNavigationTabObserver::Get(details->source_web_contents);
447 if (!tab_observer) { 447 if (!tab_observer) {
448 // If you hit this DCHECK(), please add reproduction steps to 448 // If you hit this DCHECK(), please add reproduction steps to
449 // http://crbug.com/109464. 449 // http://crbug.com/109464.
450 DCHECK(details->source_web_contents->GetViewType() != 450 DCHECK(details->source_web_contents->GetViewType() !=
451 content::VIEW_TYPE_TAB_CONTENTS); 451 content::VIEW_TYPE_WEB_CONTENTS);
452 return; 452 return;
453 } 453 }
454 const FrameNavigationState& frame_navigation_state = 454 const FrameNavigationState& frame_navigation_state =
455 tab_observer->frame_navigation_state(); 455 tab_observer->frame_navigation_state();
456 456
457 if (!frame_navigation_state.CanSendEvents(details->source_frame_id)) 457 if (!frame_navigation_state.CanSendEvents(details->source_frame_id))
458 return; 458 return;
459 459
460 // If the WebContents was created as a response to an IPC from a renderer 460 // If the WebContents was created as a response to an IPC from a renderer
461 // (and therefore doesn't yet have a wrapper), or if it isn't yet inserted 461 // (and therefore doesn't yet have a wrapper), or if it isn't yet inserted
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 frameDict->SetBoolean( 801 frameDict->SetBoolean(
802 keys::kErrorOccurredKey, 802 keys::kErrorOccurredKey,
803 navigation_state.GetErrorOccurredInFrame(*frame)); 803 navigation_state.GetErrorOccurredInFrame(*frame));
804 resultList->Append(frameDict); 804 resultList->Append(frameDict);
805 } 805 }
806 result_.reset(resultList); 806 result_.reset(resultList);
807 return true; 807 return true;
808 } 808 }
809 809
810 } // namespace extensions 810 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698