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

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

Issue 10409088: Get rid of the RenderViewType concept in content, since it was only used by Chrome. Store the enum… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
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(chrome::GetViewType(details->source_web_contents) !=
451 chrome::VIEW_TYPE_TAB_CONTENTS); 451 chrome::VIEW_TYPE_TAB_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
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 frameDict->SetBoolean( 803 frameDict->SetBoolean(
804 keys::kErrorOccurredKey, 804 keys::kErrorOccurredKey,
805 navigation_state.GetErrorOccurredInFrame(*frame)); 805 navigation_state.GetErrorOccurredInFrame(*frame));
806 resultList->Append(frameDict); 806 resultList->Append(frameDict);
807 } 807 }
808 result_.reset(resultList); 808 result_.reset(resultList);
809 return true; 809 return true;
810 } 810 }
811 811
812 } // namespace extensions 812 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698