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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2490 } | 2490 } |
2491 | 2491 |
2492 bool WebContentsImpl::IsSubframe() const { | 2492 bool WebContentsImpl::IsSubframe() const { |
2493 return is_subframe_; | 2493 return is_subframe_; |
2494 } | 2494 } |
2495 | 2495 |
2496 void WebContentsImpl::Find(int request_id, | 2496 void WebContentsImpl::Find(int request_id, |
2497 const base::string16& search_text, | 2497 const base::string16& search_text, |
2498 const blink::WebFindOptions& options) { | 2498 const blink::WebFindOptions& options) { |
2499 // See if a top level browser plugin handles the find request first. | 2499 // See if a top level browser plugin handles the find request first. |
2500 if (browser_plugin_embedder_ && | 2500 if (browser_plugin_embedder_) { |
2501 browser_plugin_embedder_->Find(request_id, search_text, options)) { | 2501 BrowserPluginGuest* guest = browser_plugin_embedder_->GetFullPageGuest(); |
2502 return; | 2502 if (guest && guest->Find(request_id, search_text, options)) |
| 2503 return; |
2503 } | 2504 } |
2504 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); | 2505 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); |
2505 } | 2506 } |
2506 | 2507 |
2507 void WebContentsImpl::StopFinding(StopFindAction action) { | 2508 void WebContentsImpl::StopFinding(StopFindAction action) { |
2508 // See if a top level browser plugin handles the stop finding request first. | 2509 // See if a top level browser plugin handles the stop finding request first. |
2509 if (browser_plugin_embedder_ && | 2510 if (browser_plugin_embedder_) { |
2510 browser_plugin_embedder_->StopFinding(action)) { | 2511 BrowserPluginGuest* guest = browser_plugin_embedder_->GetFullPageGuest(); |
2511 return; | 2512 if (guest && guest->StopFinding(action)) |
| 2513 return; |
2512 } | 2514 } |
2513 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); | 2515 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); |
2514 } | 2516 } |
2515 | 2517 |
2516 void WebContentsImpl::InsertCSS(const std::string& css) { | 2518 void WebContentsImpl::InsertCSS(const std::string& css) { |
2517 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 2519 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
2518 GetMainFrame()->GetRoutingID(), css)); | 2520 GetMainFrame()->GetRoutingID(), css)); |
2519 } | 2521 } |
2520 | 2522 |
2521 bool WebContentsImpl::WasRecentlyAudible() { | 2523 bool WebContentsImpl::WasRecentlyAudible() { |
(...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4525 node->render_manager()->ResumeResponseDeferredAtStart(); | 4527 node->render_manager()->ResumeResponseDeferredAtStart(); |
4526 } | 4528 } |
4527 | 4529 |
4528 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4530 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4529 force_disable_overscroll_content_ = force_disable; | 4531 force_disable_overscroll_content_ = force_disable; |
4530 if (view_) | 4532 if (view_) |
4531 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4533 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4532 } | 4534 } |
4533 | 4535 |
4534 } // namespace content | 4536 } // namespace content |
OLD | NEW |