| 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 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 WebFileChooserCompletion* chooser_completion) { | 1836 WebFileChooserCompletion* chooser_completion) { |
| 1837 int id = enumeration_completion_id_++; | 1837 int id = enumeration_completion_id_++; |
| 1838 enumeration_completions_[id] = chooser_completion; | 1838 enumeration_completions_[id] = chooser_completion; |
| 1839 return Send(new ViewHostMsg_EnumerateDirectory( | 1839 return Send(new ViewHostMsg_EnumerateDirectory( |
| 1840 routing_id_, | 1840 routing_id_, |
| 1841 id, | 1841 id, |
| 1842 base::FilePath::FromUTF16Unsafe(path))); | 1842 base::FilePath::FromUTF16Unsafe(path))); |
| 1843 } | 1843 } |
| 1844 | 1844 |
| 1845 void RenderViewImpl::didStartLoading(bool to_different_document) { | 1845 void RenderViewImpl::didStartLoading(bool to_different_document) { |
| 1846 didStartLoading(); | |
| 1847 } | |
| 1848 | |
| 1849 void RenderViewImpl::didStartLoading() { | |
| 1850 if (is_loading_) { | 1846 if (is_loading_) { |
| 1851 DVLOG(1) << "didStartLoading called while loading"; | 1847 DVLOG(1) << "didStartLoading called while loading"; |
| 1852 return; | 1848 return; |
| 1853 } | 1849 } |
| 1854 | 1850 |
| 1855 is_loading_ = true; | 1851 is_loading_ = true; |
| 1856 | 1852 |
| 1857 // Send the IPC message through the top-level frame. | 1853 // Send the IPC message through the top-level frame. |
| 1858 main_render_frame_->didStartLoading(); | 1854 main_render_frame_->didStartLoading(to_different_document); |
| 1859 | 1855 |
| 1860 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading()); | 1856 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading()); |
| 1861 } | 1857 } |
| 1862 | 1858 |
| 1863 void RenderViewImpl::didStopLoading() { | 1859 void RenderViewImpl::didStopLoading() { |
| 1864 if (!is_loading_) { | 1860 if (!is_loading_) { |
| 1865 DVLOG(1) << "DidStopLoading called while not loading"; | 1861 DVLOG(1) << "DidStopLoading called while not loading"; |
| 1866 return; | 1862 return; |
| 1867 } | 1863 } |
| 1868 | 1864 |
| (...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { | 3250 blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { |
| 3255 return visibilityState(); | 3251 return visibilityState(); |
| 3256 } | 3252 } |
| 3257 | 3253 |
| 3258 void RenderViewImpl::RunModalAlertDialog(blink::WebFrame* frame, | 3254 void RenderViewImpl::RunModalAlertDialog(blink::WebFrame* frame, |
| 3259 const blink::WebString& message) { | 3255 const blink::WebString& message) { |
| 3260 return runModalAlertDialog(frame, message); | 3256 return runModalAlertDialog(frame, message); |
| 3261 } | 3257 } |
| 3262 | 3258 |
| 3263 void RenderViewImpl::DidStartLoading() { | 3259 void RenderViewImpl::DidStartLoading() { |
| 3264 didStartLoading(); | 3260 didStartLoading(true); |
| 3265 } | 3261 } |
| 3266 | 3262 |
| 3267 void RenderViewImpl::DidStopLoading() { | 3263 void RenderViewImpl::DidStopLoading() { |
| 3268 didStopLoading(); | 3264 didStopLoading(); |
| 3269 } | 3265 } |
| 3270 | 3266 |
| 3271 void RenderViewImpl::DidPlay(blink::WebMediaPlayer* player) { | 3267 void RenderViewImpl::DidPlay(blink::WebMediaPlayer* player) { |
| 3272 Send(new ViewHostMsg_MediaPlayingNotification(routing_id_, | 3268 Send(new ViewHostMsg_MediaPlayingNotification(routing_id_, |
| 3273 reinterpret_cast<int64>(player), | 3269 reinterpret_cast<int64>(player), |
| 3274 player->hasVideo(), | 3270 player->hasVideo(), |
| (...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5157 for (size_t i = 0; i < icon_urls.size(); i++) { | 5153 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 5158 WebURL url = icon_urls[i].iconURL(); | 5154 WebURL url = icon_urls[i].iconURL(); |
| 5159 if (!url.isEmpty()) | 5155 if (!url.isEmpty()) |
| 5160 urls.push_back(FaviconURL(url, | 5156 urls.push_back(FaviconURL(url, |
| 5161 ToFaviconType(icon_urls[i].iconType()))); | 5157 ToFaviconType(icon_urls[i].iconType()))); |
| 5162 } | 5158 } |
| 5163 SendUpdateFaviconURL(urls); | 5159 SendUpdateFaviconURL(urls); |
| 5164 } | 5160 } |
| 5165 | 5161 |
| 5166 } // namespace content | 5162 } // namespace content |
| OLD | NEW |