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/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2501 | 2501 |
2502 // Notify observers about navigation. | 2502 // Notify observers about navigation. |
2503 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2503 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2504 DidNavigateAnyFrame(details, params)); | 2504 DidNavigateAnyFrame(details, params)); |
2505 } | 2505 } |
2506 | 2506 |
2507 void WebContentsImpl::SetMainFrameMimeType(const std::string& mime_type) { | 2507 void WebContentsImpl::SetMainFrameMimeType(const std::string& mime_type) { |
2508 contents_mime_type_ = mime_type; | 2508 contents_mime_type_ = mime_type; |
2509 } | 2509 } |
2510 | 2510 |
2511 bool WebContentsImpl::CanOverscrollContent() { | 2511 bool WebContentsImpl::CanOverscrollContent() const { |
2512 if (delegate_) | 2512 if (delegate_) |
2513 return delegate_->CanOverscrollContent(); | 2513 return delegate_->CanOverscrollContent(); |
2514 | 2514 |
2515 return false; | 2515 return false; |
2516 } | 2516 } |
2517 | 2517 |
2518 void WebContentsImpl::OnDidLoadResourceFromMemoryCache( | 2518 void WebContentsImpl::OnDidLoadResourceFromMemoryCache( |
2519 const GURL& url, | 2519 const GURL& url, |
2520 const std::string& security_info, | 2520 const std::string& security_info, |
2521 const std::string& http_method, | 2521 const std::string& http_method, |
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4075 | 4075 |
4076 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 4076 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
4077 if (!delegate_) | 4077 if (!delegate_) |
4078 return; | 4078 return; |
4079 const gfx::Size new_size = GetPreferredSize(); | 4079 const gfx::Size new_size = GetPreferredSize(); |
4080 if (new_size != old_size) | 4080 if (new_size != old_size) |
4081 delegate_->UpdatePreferredSize(this, new_size); | 4081 delegate_->UpdatePreferredSize(this, new_size); |
4082 } | 4082 } |
4083 | 4083 |
4084 } // namespace content | 4084 } // namespace content |
OLD | NEW |