| OLD | NEW |
| 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/extensions/api/web_navigation/web_navigation_api_consta
nts.h" | 10 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta
nts.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 pending_render_view_host_ = render_view_host; | 353 pending_render_view_host_ = render_view_host; |
| 354 } | 354 } |
| 355 } | 355 } |
| 356 | 356 |
| 357 void WebNavigationTabObserver::DidStartProvisionalLoadForFrame( | 357 void WebNavigationTabObserver::DidStartProvisionalLoadForFrame( |
| 358 int64 frame_num, | 358 int64 frame_num, |
| 359 int64 parent_frame_num, | 359 int64 parent_frame_num, |
| 360 bool is_main_frame, | 360 bool is_main_frame, |
| 361 const GURL& validated_url, | 361 const GURL& validated_url, |
| 362 bool is_error_page, | 362 bool is_error_page, |
| 363 bool is_iframe_srcdoc, |
| 363 content::RenderViewHost* render_view_host) { | 364 content::RenderViewHost* render_view_host) { |
| 364 if (!render_view_host_) | 365 if (!render_view_host_) |
| 365 render_view_host_ = render_view_host; | 366 render_view_host_ = render_view_host; |
| 366 if (render_view_host != render_view_host_ && | 367 if (render_view_host != render_view_host_ && |
| 367 render_view_host != pending_render_view_host_) | 368 render_view_host != pending_render_view_host_) |
| 368 return; | 369 return; |
| 369 | 370 |
| 370 FrameNavigationState::FrameID frame_id(frame_num, render_view_host); | 371 FrameNavigationState::FrameID frame_id(frame_num, render_view_host); |
| 371 FrameNavigationState::FrameID parent_frame_id( | 372 FrameNavigationState::FrameID parent_frame_id( |
| 372 parent_frame_num, render_view_host); | 373 parent_frame_num, render_view_host); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> > | 772 static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> > |
| 772 g_factory = LAZY_INSTANCE_INITIALIZER; | 773 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 773 | 774 |
| 774 template <> | 775 template <> |
| 775 ProfileKeyedAPIFactory<WebNavigationAPI>* | 776 ProfileKeyedAPIFactory<WebNavigationAPI>* |
| 776 ProfileKeyedAPIFactory<WebNavigationAPI>::GetInstance() { | 777 ProfileKeyedAPIFactory<WebNavigationAPI>::GetInstance() { |
| 777 return &g_factory.Get(); | 778 return &g_factory.Get(); |
| 778 } | 779 } |
| 779 | 780 |
| 780 } // namespace extensions | 781 } // namespace extensions |
| OLD | NEW |