| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/renderer/chrome_render_frame_observer.h" | 5 #include "chrome/renderer/chrome_render_frame_observer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // Let translate_helper do any preparatory work for loading a URL. | 266 // Let translate_helper do any preparatory work for loading a URL. |
| 267 if (!translate_helper_) | 267 if (!translate_helper_) |
| 268 return; | 268 return; |
| 269 | 269 |
| 270 translate_helper_->PrepareForUrl( | 270 translate_helper_->PrepareForUrl( |
| 271 render_frame()->GetWebFrame()->document().url()); | 271 render_frame()->GetWebFrame()->document().url()); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void ChromeRenderFrameObserver::DidCommitProvisionalLoad( | 274 void ChromeRenderFrameObserver::DidCommitProvisionalLoad( |
| 275 bool is_new_navigation, | 275 bool is_new_navigation, |
| 276 bool is_same_page_navigation) { | 276 bool is_same_document_navigation) { |
| 277 WebLocalFrame* frame = render_frame()->GetWebFrame(); | 277 WebLocalFrame* frame = render_frame()->GetWebFrame(); |
| 278 | 278 |
| 279 // Don't do anything for subframes. | 279 // Don't do anything for subframes. |
| 280 if (frame->parent()) | 280 if (frame->parent()) |
| 281 return; | 281 return; |
| 282 | 282 |
| 283 base::debug::SetCrashKeyValue( | 283 base::debug::SetCrashKeyValue( |
| 284 crash_keys::kViewCount, | 284 crash_keys::kViewCount, |
| 285 base::SizeTToString(content::RenderView::GetRenderViewCount())); | 285 base::SizeTToString(content::RenderView::GetRenderViewCount())); |
| 286 } | 286 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 void ChromeRenderFrameObserver::OnImageContextMenuRendererRequest( | 361 void ChromeRenderFrameObserver::OnImageContextMenuRendererRequest( |
| 362 chrome::mojom::ImageContextMenuRendererRequest request) { | 362 chrome::mojom::ImageContextMenuRendererRequest request) { |
| 363 image_context_menu_renderer_bindings_.AddBinding(this, std::move(request)); | 363 image_context_menu_renderer_bindings_.AddBinding(this, std::move(request)); |
| 364 } | 364 } |
| 365 | 365 |
| 366 void ChromeRenderFrameObserver::OnThumbnailCapturerRequest( | 366 void ChromeRenderFrameObserver::OnThumbnailCapturerRequest( |
| 367 chrome::mojom::ThumbnailCapturerRequest request) { | 367 chrome::mojom::ThumbnailCapturerRequest request) { |
| 368 thumbnail_capturer_bindings_.AddBinding(this, std::move(request)); | 368 thumbnail_capturer_bindings_.AddBinding(this, std::move(request)); |
| 369 } | 369 } |
| OLD | NEW |