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

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

Issue 580133002: Update entry page type to include error pages when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix for unit_tests Created 6 years, 3 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
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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 helpers::DispatchOnBeforeNavigate( 361 helpers::DispatchOnBeforeNavigate(
362 web_contents(), 362 web_contents(),
363 render_frame_host, 363 render_frame_host,
364 navigation_state_.GetUrl(render_frame_host)); 364 navigation_state_.GetUrl(render_frame_host));
365 } 365 }
366 366
367 void WebNavigationTabObserver::DidCommitProvisionalLoadForFrame( 367 void WebNavigationTabObserver::DidCommitProvisionalLoadForFrame(
368 content::RenderFrameHost* render_frame_host, 368 content::RenderFrameHost* render_frame_host,
369 const GURL& url, 369 const GURL& url,
370 bool url_is_unreachable,
370 ui::PageTransition transition_type) { 371 ui::PageTransition transition_type) {
371 content::RenderViewHost* render_view_host = 372 content::RenderViewHost* render_view_host =
372 render_frame_host->GetRenderViewHost(); 373 render_frame_host->GetRenderViewHost();
373 DVLOG(2) << "DidCommitProvisionalLoad(" 374 DVLOG(2) << "DidCommitProvisionalLoad("
374 << "render_view_host=" << render_view_host 375 << "render_view_host=" << render_view_host
375 << ", frame_num=" << render_frame_host->GetRoutingID() 376 << ", frame_num=" << render_frame_host->GetRoutingID()
376 << ", url=" << url << ")"; 377 << ", url=" << url << ")";
377 if (render_view_host != render_view_host_ && 378 if (render_view_host != render_view_host_ &&
378 render_view_host != pending_render_view_host_) 379 render_view_host != pending_render_view_host_)
379 return; 380 return;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 return g_factory.Pointer(); 771 return g_factory.Pointer();
771 } 772 }
772 773
773 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { 774 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) {
774 web_navigation_event_router_.reset(new WebNavigationEventRouter( 775 web_navigation_event_router_.reset(new WebNavigationEventRouter(
775 Profile::FromBrowserContext(browser_context_))); 776 Profile::FromBrowserContext(browser_context_)));
776 EventRouter::Get(browser_context_)->UnregisterObserver(this); 777 EventRouter::Get(browser_context_)->UnregisterObserver(this);
777 } 778 }
778 779
779 } // namespace extensions 780 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698