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/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 Loading... |
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 355 } |
351 | 356 |
352 void NavigationEntryImpl::SetScreenshotPNGData( | 357 void NavigationEntryImpl::SetScreenshotPNGData( |
353 scoped_refptr<base::RefCountedBytes> png_data) { | 358 scoped_refptr<base::RefCountedBytes> png_data) { |
354 screenshot_ = png_data; | 359 screenshot_ = png_data; |
355 if (screenshot_.get()) | 360 if (screenshot_.get()) |
356 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 361 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
357 } | 362 } |
358 | 363 |
359 } // namespace content | 364 } // namespace content |
OLD | NEW |