OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2704 } | 2704 } |
2705 | 2705 |
2706 void RenderView::didFinishLoad(WebFrame* frame) { | 2706 void RenderView::didFinishLoad(WebFrame* frame) { |
2707 WebDataSource* ds = frame->dataSource(); | 2707 WebDataSource* ds = frame->dataSource(); |
2708 NavigationState* navigation_state = NavigationState::FromDataSource(ds); | 2708 NavigationState* navigation_state = NavigationState::FromDataSource(ds); |
2709 DCHECK(navigation_state); | 2709 DCHECK(navigation_state); |
2710 navigation_state->set_finish_load_time(Time::Now()); | 2710 navigation_state->set_finish_load_time(Time::Now()); |
2711 navigation_state->user_script_idle_scheduler()->DidFinishLoad(); | 2711 navigation_state->user_script_idle_scheduler()->DidFinishLoad(); |
2712 } | 2712 } |
2713 | 2713 |
2714 void RenderView::didChangeLocationWithinPage( | 2714 void RenderView::didNavigateWithinPage( |
2715 WebFrame* frame, bool is_new_navigation) { | 2715 WebFrame* frame, bool is_new_navigation) { |
2716 | 2716 |
2717 // Determine if the UserScriptIdleScheduler already ran scripts on this page, | 2717 // Determine if the UserScriptIdleScheduler already ran scripts on this page, |
2718 // since a new one gets created by didCreateDataSource. | 2718 // since a new one gets created by didCreateDataSource. |
2719 NavigationState* state = | 2719 NavigationState* state = |
2720 NavigationState::FromDataSource(frame->dataSource()); | 2720 NavigationState::FromDataSource(frame->dataSource()); |
2721 bool idle_scheduler_ran = state->user_script_idle_scheduler()->has_run(); | 2721 bool idle_scheduler_ran = state->user_script_idle_scheduler()->has_run(); |
2722 | 2722 |
2723 // If this was a reference fragment navigation that we initiated, then we | 2723 // If this was a reference fragment navigation that we initiated, then we |
2724 // could end up having a non-null pending navigation state. We just need to | 2724 // could end up having a non-null pending navigation state. We just need to |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4695 gfx::PluginWindowHandle window) { | 4695 gfx::PluginWindowHandle window) { |
4696 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); | 4696 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); |
4697 } | 4697 } |
4698 #endif | 4698 #endif |
4699 | 4699 |
4700 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { | 4700 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { |
4701 if (!geolocation_dispatcher_.get()) | 4701 if (!geolocation_dispatcher_.get()) |
4702 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | 4702 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); |
4703 return geolocation_dispatcher_.get(); | 4703 return geolocation_dispatcher_.get(); |
4704 } | 4704 } |
OLD | NEW |