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

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

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misc fixes Created 7 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 | content/browser/frame_host/frame_tree.h » ('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) 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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 return; 534 return;
535 navigation_state_.SetNavigationCompleted(frame_id); 535 navigation_state_.SetNavigationCompleted(frame_id);
536 if (!navigation_state_.CanSendEvents(frame_id)) 536 if (!navigation_state_.CanSendEvents(frame_id))
537 return; 537 return;
538 DCHECK( 538 DCHECK(
539 navigation_state_.GetUrl(frame_id) == validated_url || 539 navigation_state_.GetUrl(frame_id) == validated_url ||
540 (navigation_state_.GetUrl(frame_id) == GURL(content::kAboutSrcDocURL) && 540 (navigation_state_.GetUrl(frame_id) == GURL(content::kAboutSrcDocURL) &&
541 validated_url == GURL(content::kAboutBlankURL))) 541 validated_url == GURL(content::kAboutBlankURL)))
542 << "validated URL is " << validated_url << " but we expected " 542 << "validated URL is " << validated_url << " but we expected "
543 << navigation_state_.GetUrl(frame_id); 543 << navigation_state_.GetUrl(frame_id);
544 DCHECK_EQ(navigation_state_.IsMainFrame(frame_id), is_main_frame); 544 // TODO(creis): Diagnose.
545 //DCHECK_EQ(navigation_state_.IsMainFrame(frame_id), is_main_frame);
545 546
546 // The load might already have finished by the time we finished parsing. For 547 // The load might already have finished by the time we finished parsing. For
547 // compatibility reasons, we artifically delay the load completed signal until 548 // compatibility reasons, we artifically delay the load completed signal until
548 // after parsing was completed. 549 // after parsing was completed.
549 if (!navigation_state_.GetParsingFinished(frame_id)) 550 if (!navigation_state_.GetParsingFinished(frame_id))
550 return; 551 return;
551 helpers::DispatchOnCompleted(web_contents(), 552 helpers::DispatchOnCompleted(web_contents(),
552 navigation_state_.GetUrl(frame_id), 553 navigation_state_.GetUrl(frame_id),
553 is_main_frame, 554 is_main_frame,
554 frame_num); 555 frame_num);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 } 834 }
834 835
835 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { 836 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) {
836 web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_)); 837 web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_));
837 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 838 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
838 } 839 }
839 840
840 #endif // OS_ANDROID 841 #endif // OS_ANDROID
841 842
842 } // namespace extensions 843 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698