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