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 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2257 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); | 2257 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); |
2258 } | 2258 } |
2259 | 2259 |
2260 void WebContentsImpl::InsertCSS(const std::string& css) { | 2260 void WebContentsImpl::InsertCSS(const std::string& css) { |
2261 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 2261 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
2262 GetMainFrame()->GetRoutingID(), css)); | 2262 GetMainFrame()->GetRoutingID(), css)); |
2263 } | 2263 } |
2264 | 2264 |
2265 bool WebContentsImpl::FocusLocationBarByDefault() { | 2265 bool WebContentsImpl::FocusLocationBarByDefault() { |
2266 NavigationEntry* entry = controller_.GetVisibleEntry(); | 2266 NavigationEntry* entry = controller_.GetVisibleEntry(); |
2267 if (entry && entry->GetURL() == GURL(kAboutBlankURL)) | 2267 if (entry && entry->GetURL() == GURL(url::kAboutBlankURL)) |
2268 return true; | 2268 return true; |
2269 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); | 2269 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); |
2270 } | 2270 } |
2271 | 2271 |
2272 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { | 2272 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { |
2273 if (delegate_) | 2273 if (delegate_) |
2274 delegate_->SetFocusToLocationBar(select_all); | 2274 delegate_->SetFocusToLocationBar(select_all); |
2275 } | 2275 } |
2276 | 2276 |
2277 void WebContentsImpl::DidStartProvisionalLoad( | 2277 void WebContentsImpl::DidStartProvisionalLoad( |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4047 | 4047 |
4048 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 4048 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
4049 if (!delegate_) | 4049 if (!delegate_) |
4050 return; | 4050 return; |
4051 const gfx::Size new_size = GetPreferredSize(); | 4051 const gfx::Size new_size = GetPreferredSize(); |
4052 if (new_size != old_size) | 4052 if (new_size != old_size) |
4053 delegate_->UpdatePreferredSize(this, new_size); | 4053 delegate_->UpdatePreferredSize(this, new_size); |
4054 } | 4054 } |
4055 | 4055 |
4056 } // namespace content | 4056 } // namespace content |
OLD | NEW |