| 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 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 RenderViewHost* host = GetRenderViewHost(); | 2125 RenderViewHost* host = GetRenderViewHost(); |
| 2126 int id = StartDownload(host, url, is_favicon, max_bitmap_size); | 2126 int id = StartDownload(host, url, is_favicon, max_bitmap_size); |
| 2127 image_download_map_[id] = callback; | 2127 image_download_map_[id] = callback; |
| 2128 return id; | 2128 return id; |
| 2129 } | 2129 } |
| 2130 | 2130 |
| 2131 bool WebContentsImpl::IsSubframe() const { | 2131 bool WebContentsImpl::IsSubframe() const { |
| 2132 return is_subframe_; | 2132 return is_subframe_; |
| 2133 } | 2133 } |
| 2134 | 2134 |
| 2135 void WebContentsImpl::Find(int request_id, |
| 2136 const base::string16& search_text, |
| 2137 const blink::WebFindOptions& options) { |
| 2138 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); |
| 2139 } |
| 2140 |
| 2141 void WebContentsImpl::StopFinding(StopFindAction action) { |
| 2142 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); |
| 2143 } |
| 2144 |
| 2135 bool WebContentsImpl::FocusLocationBarByDefault() { | 2145 bool WebContentsImpl::FocusLocationBarByDefault() { |
| 2136 NavigationEntry* entry = controller_.GetVisibleEntry(); | 2146 NavigationEntry* entry = controller_.GetVisibleEntry(); |
| 2137 if (entry && entry->GetURL() == GURL(kAboutBlankURL)) | 2147 if (entry && entry->GetURL() == GURL(kAboutBlankURL)) |
| 2138 return true; | 2148 return true; |
| 2139 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); | 2149 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); |
| 2140 } | 2150 } |
| 2141 | 2151 |
| 2142 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { | 2152 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { |
| 2143 if (delegate_) | 2153 if (delegate_) |
| 2144 delegate_->SetFocusToLocationBar(select_all); | 2154 delegate_->SetFocusToLocationBar(select_all); |
| (...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3853 } | 3863 } |
| 3854 | 3864 |
| 3855 void WebContentsImpl::OnFrameRemoved( | 3865 void WebContentsImpl::OnFrameRemoved( |
| 3856 RenderViewHostImpl* render_view_host, | 3866 RenderViewHostImpl* render_view_host, |
| 3857 int64 frame_id) { | 3867 int64 frame_id) { |
| 3858 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3868 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3859 FrameDetached(render_view_host, frame_id)); | 3869 FrameDetached(render_view_host, frame_id)); |
| 3860 } | 3870 } |
| 3861 | 3871 |
| 3862 } // namespace content | 3872 } // namespace content |
| OLD | NEW |