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/browser/web_contents/navigation_entry_impl.h" | 5 #include "content/browser/web_contents/navigation_entry_impl.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "content/public/common/content_constants.h" | 10 #include "content/public/common/content_constants.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 void NavigationEntryImpl::SetTitle(const string16& title) { | 129 void NavigationEntryImpl::SetTitle(const string16& title) { |
130 title_ = title; | 130 title_ = title; |
131 cached_display_title_.clear(); | 131 cached_display_title_.clear(); |
132 } | 132 } |
133 | 133 |
134 const string16& NavigationEntryImpl::GetTitle() const { | 134 const string16& NavigationEntryImpl::GetTitle() const { |
135 return title_; | 135 return title_; |
136 } | 136 } |
137 | 137 |
138 void NavigationEntryImpl::SetContentState(const std::string& state) { | 138 void NavigationEntryImpl::SetPageState(const PageState& state) { |
139 content_state_ = state; | 139 page_state_ = state; |
140 } | 140 } |
141 | 141 |
142 const std::string& NavigationEntryImpl::GetContentState() const { | 142 const PageState& NavigationEntryImpl::GetPageState() const { |
143 return content_state_; | 143 return page_state_; |
144 } | 144 } |
145 | 145 |
146 void NavigationEntryImpl::SetPageID(int page_id) { | 146 void NavigationEntryImpl::SetPageID(int page_id) { |
147 page_id_ = page_id; | 147 page_id_ = page_id; |
148 } | 148 } |
149 | 149 |
150 int32 NavigationEntryImpl::GetPageID() const { | 150 int32 NavigationEntryImpl::GetPageID() const { |
151 return page_id_; | 151 return page_id_; |
152 } | 152 } |
153 | 153 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 } | 312 } |
313 | 313 |
314 void NavigationEntryImpl::SetScreenshotPNGData( | 314 void NavigationEntryImpl::SetScreenshotPNGData( |
315 scoped_refptr<base::RefCountedBytes> png_data) { | 315 scoped_refptr<base::RefCountedBytes> png_data) { |
316 screenshot_ = png_data; | 316 screenshot_ = png_data; |
317 if (screenshot_) | 317 if (screenshot_) |
318 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 318 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
319 } | 319 } |
320 | 320 |
321 } // namespace content | 321 } // namespace content |
OLD | NEW |