| 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3180 DocumentState::FromDataSource(frame->dataSource()); | 3180 DocumentState::FromDataSource(frame->dataSource()); |
| 3181 UpdateNavigationState(document_state); | 3181 UpdateNavigationState(document_state); |
| 3182 static_cast<NavigationStateImpl*>(document_state->navigation_state()) | 3182 static_cast<NavigationStateImpl*>(document_state->navigation_state()) |
| 3183 ->set_was_within_same_page(true); | 3183 ->set_was_within_same_page(true); |
| 3184 | 3184 |
| 3185 didCommitProvisionalLoad(frame, item, commit_type); | 3185 didCommitProvisionalLoad(frame, item, commit_type); |
| 3186 } | 3186 } |
| 3187 | 3187 |
| 3188 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { | 3188 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { |
| 3189 DCHECK(!frame_ || frame_ == frame); | 3189 DCHECK(!frame_ || frame_ == frame); |
| 3190 // TODO(nasko): Move implementation here. Needed methods: | 3190 render_view_->StartNavStateSyncTimerIfNecessary(this); |
| 3191 // * StartNavStateSyncTimerIfNecessary | |
| 3192 render_view_->didUpdateCurrentHistoryItem(frame); | |
| 3193 } | 3191 } |
| 3194 | 3192 |
| 3195 void RenderFrameImpl::didChangeThemeColor() { | 3193 void RenderFrameImpl::didChangeThemeColor() { |
| 3196 if (frame_->parent()) | 3194 if (frame_->parent()) |
| 3197 return; | 3195 return; |
| 3198 | 3196 |
| 3199 Send(new FrameHostMsg_DidChangeThemeColor( | 3197 Send(new FrameHostMsg_DidChangeThemeColor( |
| 3200 routing_id_, frame_->document().themeColor())); | 3198 routing_id_, frame_->document().themeColor())); |
| 3201 } | 3199 } |
| 3202 | 3200 |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3657 int world_id) { | 3655 int world_id) { |
| 3658 DCHECK(!frame_ || frame_ == frame); | 3656 DCHECK(!frame_ || frame_ == frame); |
| 3659 | 3657 |
| 3660 FOR_EACH_OBSERVER(RenderFrameObserver, | 3658 FOR_EACH_OBSERVER(RenderFrameObserver, |
| 3661 observers_, | 3659 observers_, |
| 3662 WillReleaseScriptContext(context, world_id)); | 3660 WillReleaseScriptContext(context, world_id)); |
| 3663 } | 3661 } |
| 3664 | 3662 |
| 3665 void RenderFrameImpl::didChangeScrollOffset(blink::WebLocalFrame* frame) { | 3663 void RenderFrameImpl::didChangeScrollOffset(blink::WebLocalFrame* frame) { |
| 3666 DCHECK(!frame_ || frame_ == frame); | 3664 DCHECK(!frame_ || frame_ == frame); |
| 3667 // TODO(nasko): Move implementation here. Needed methods: | 3665 render_view_->StartNavStateSyncTimerIfNecessary(this); |
| 3668 // * StartNavStateSyncTimerIfNecessary | |
| 3669 render_view_->didChangeScrollOffset(frame); | |
| 3670 | 3666 |
| 3671 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidChangeScrollOffset()); | 3667 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidChangeScrollOffset()); |
| 3672 } | 3668 } |
| 3673 | 3669 |
| 3674 void RenderFrameImpl::willInsertBody(blink::WebLocalFrame* frame) { | 3670 void RenderFrameImpl::willInsertBody(blink::WebLocalFrame* frame) { |
| 3675 DCHECK(!frame_ || frame_ == frame); | 3671 DCHECK(!frame_ || frame_ == frame); |
| 3676 if (!frame->parent()) { | 3672 if (!frame->parent()) { |
| 3677 render_view_->Send(new ViewHostMsg_WillInsertBody( | 3673 render_view_->Send(new ViewHostMsg_WillInsertBody( |
| 3678 render_view_->GetRoutingID())); | 3674 render_view_->GetRoutingID())); |
| 3679 } | 3675 } |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5360 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5356 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
| 5361 scoped_refptr<media::AudioOutputDevice> device = | 5357 scoped_refptr<media::AudioOutputDevice> device = |
| 5362 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5358 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
| 5363 security_origin); | 5359 security_origin); |
| 5364 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5360 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
| 5365 device->Stop(); | 5361 device->Stop(); |
| 5366 callback.Run(status); | 5362 callback.Run(status); |
| 5367 } | 5363 } |
| 5368 | 5364 |
| 5369 } // namespace content | 5365 } // namespace content |
| OLD | NEW |