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

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 743773003: OOPIF: Data URLs are now rendered in the renderer that initiated the navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing android compile Created 6 years 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 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/browser/frame_host/navigation_entry_impl.h" 5 #include "content/browser/frame_host/navigation_entry_impl.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/public/common/content_constants.h" 10 #include "content/public/common/content_constants.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 int32 NavigationEntryImpl::GetPageID() const { 154 int32 NavigationEntryImpl::GetPageID() const {
155 return page_id_; 155 return page_id_;
156 } 156 }
157 157
158 void NavigationEntryImpl::set_site_instance(SiteInstanceImpl* site_instance) { 158 void NavigationEntryImpl::set_site_instance(SiteInstanceImpl* site_instance) {
159 site_instance_ = site_instance; 159 site_instance_ = site_instance;
160 } 160 }
161 161
162 void NavigationEntryImpl::set_source_site_instance(
163 SiteInstanceImpl* source_site_instance) {
164 source_site_instance_ = source_site_instance;
165 }
166
162 void NavigationEntryImpl::SetBindings(int bindings) { 167 void NavigationEntryImpl::SetBindings(int bindings) {
163 // Ensure this is set to a valid value, and that it stays the same once set. 168 // Ensure this is set to a valid value, and that it stays the same once set.
164 CHECK_NE(bindings, kInvalidBindings); 169 CHECK_NE(bindings, kInvalidBindings);
165 CHECK(bindings_ == kInvalidBindings || bindings_ == bindings); 170 CHECK(bindings_ == kInvalidBindings || bindings_ == bindings);
166 bindings_ = bindings; 171 bindings_ = bindings;
167 } 172 }
168 173
169 const base::string16& NavigationEntryImpl::GetTitleForDisplay( 174 const base::string16& NavigationEntryImpl::GetTitleForDisplay(
170 const std::string& languages) const { 175 const std::string& languages) const {
171 // Most pages have real titles. Don't even bother caching anything if this is 176 // Most pages have real titles. Don't even bother caching anything if this is
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 return true; 338 return true;
334 } 339 }
335 340
336 void NavigationEntryImpl::ClearExtraData(const std::string& key) { 341 void NavigationEntryImpl::ClearExtraData(const std::string& key) {
337 extra_data_.erase(key); 342 extra_data_.erase(key);
338 } 343 }
339 344
340 void NavigationEntryImpl::ResetForCommit() { 345 void NavigationEntryImpl::ResetForCommit() {
341 // Any state that only matters when a navigation entry is pending should be 346 // Any state that only matters when a navigation entry is pending should be
342 // cleared here. 347 // cleared here.
343 SetBrowserInitiatedPostData(NULL); 348 SetBrowserInitiatedPostData(nullptr);
344 set_is_renderer_initiated(false); 349 set_is_renderer_initiated(false);
345 set_transferred_global_request_id(GlobalRequestID()); 350 set_transferred_global_request_id(GlobalRequestID());
346 set_should_replace_entry(false); 351 set_should_replace_entry(false);
347 352
348 set_should_clear_history_list(false); 353 set_should_clear_history_list(false);
349 set_frame_tree_node_id(-1); 354 set_frame_tree_node_id(-1);
355 set_source_site_instance(nullptr);
350 } 356 }
351 357
352 void NavigationEntryImpl::SetScreenshotPNGData( 358 void NavigationEntryImpl::SetScreenshotPNGData(
353 scoped_refptr<base::RefCountedBytes> png_data) { 359 scoped_refptr<base::RefCountedBytes> png_data) {
354 screenshot_ = png_data; 360 screenshot_ = png_data;
355 if (screenshot_.get()) 361 if (screenshot_.get())
356 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); 362 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size());
357 } 363 }
358 364
359 } // namespace content 365 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698