Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1308113002: Make content text retrieval in ChromeRenderViewObserver never force layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to match upstream changes. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 if (!send_preferred_size_changes_ || !webview()) 2018 if (!send_preferred_size_changes_ || !webview())
2019 return; 2019 return;
2020 2020
2021 if (check_preferred_size_timer_.IsRunning()) 2021 if (check_preferred_size_timer_.IsRunning())
2022 return; 2022 return;
2023 check_preferred_size_timer_.Start(FROM_HERE, 2023 check_preferred_size_timer_.Start(FROM_HERE,
2024 TimeDelta::FromMilliseconds(0), this, 2024 TimeDelta::FromMilliseconds(0), this,
2025 &RenderViewImpl::CheckPreferredSize); 2025 &RenderViewImpl::CheckPreferredSize);
2026 } 2026 }
2027 2027
2028 void RenderViewImpl::didFirstLayoutAfterFinishedParsing() {
2029 FOR_EACH_OBSERVER(
2030 RenderViewObserver, observers_, DidFirstLayoutAfterFinishedParsing());
2031 }
2032
2028 void RenderViewImpl::navigateBackForwardSoon(int offset) { 2033 void RenderViewImpl::navigateBackForwardSoon(int offset) {
2029 Send(new ViewHostMsg_GoToEntryAtOffset(routing_id_, offset)); 2034 Send(new ViewHostMsg_GoToEntryAtOffset(routing_id_, offset));
2030 } 2035 }
2031 2036
2032 int RenderViewImpl::historyBackListCount() { 2037 int RenderViewImpl::historyBackListCount() {
2033 return history_list_offset_ < 0 ? 0 : history_list_offset_; 2038 return history_list_offset_ < 0 ? 0 : history_list_offset_;
2034 } 2039 }
2035 2040
2036 int RenderViewImpl::historyForwardListCount() { 2041 int RenderViewImpl::historyForwardListCount() {
2037 return history_list_length_ - historyBackListCount() - 1; 2042 return history_list_length_ - historyBackListCount() - 1;
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
3834 std::vector<gfx::Size> sizes; 3839 std::vector<gfx::Size> sizes;
3835 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3840 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3836 if (!url.isEmpty()) 3841 if (!url.isEmpty())
3837 urls.push_back( 3842 urls.push_back(
3838 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3843 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3839 } 3844 }
3840 SendUpdateFaviconURL(urls); 3845 SendUpdateFaviconURL(urls);
3841 } 3846 }
3842 3847
3843 } // namespace content 3848 } // namespace content
OLDNEW
« content/public/renderer/render_view_observer.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698