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 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2553 } | 2553 } |
2554 | 2554 |
2555 bool WebContentsImpl::IsSubframe() const { | 2555 bool WebContentsImpl::IsSubframe() const { |
2556 return is_subframe_; | 2556 return is_subframe_; |
2557 } | 2557 } |
2558 | 2558 |
2559 void WebContentsImpl::Find(int request_id, | 2559 void WebContentsImpl::Find(int request_id, |
2560 const base::string16& search_text, | 2560 const base::string16& search_text, |
2561 const blink::WebFindOptions& options) { | 2561 const blink::WebFindOptions& options) { |
2562 // See if a top level browser plugin handles the find request first. | 2562 // See if a top level browser plugin handles the find request first. |
2563 if (browser_plugin_embedder_ && | 2563 if (browser_plugin_embedder_) { |
2564 browser_plugin_embedder_->Find(request_id, search_text, options)) { | 2564 BrowserPluginGuest* guest = browser_plugin_embedder_->GetFullPageGuest(); |
Sam McNally
2015/04/01 06:04:49
Is this the right behavior for all guest types?
raymes
2015/04/13 11:00:31
Yes, only the MimeHandlerViewGuest should turn tru
| |
2565 return; | 2565 if (guest && guest->Find(request_id, search_text, options)) |
2566 return; | |
2566 } | 2567 } |
2567 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); | 2568 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); |
2568 } | 2569 } |
2569 | 2570 |
2570 void WebContentsImpl::StopFinding(StopFindAction action) { | 2571 void WebContentsImpl::StopFinding(StopFindAction action) { |
2571 // See if a top level browser plugin handles the stop finding request first. | 2572 // See if a top level browser plugin handles the stop finding request first. |
2572 if (browser_plugin_embedder_ && | 2573 if (browser_plugin_embedder_) { |
2573 browser_plugin_embedder_->StopFinding(action)) { | 2574 BrowserPluginGuest* guest = browser_plugin_embedder_->GetFullPageGuest(); |
2574 return; | 2575 if (guest && guest->StopFinding(action)) |
2576 return; | |
2575 } | 2577 } |
2576 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); | 2578 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); |
2577 } | 2579 } |
2578 | 2580 |
2579 void WebContentsImpl::InsertCSS(const std::string& css) { | 2581 void WebContentsImpl::InsertCSS(const std::string& css) { |
2580 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 2582 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
2581 GetMainFrame()->GetRoutingID(), css)); | 2583 GetMainFrame()->GetRoutingID(), css)); |
2582 } | 2584 } |
2583 | 2585 |
2584 bool WebContentsImpl::WasRecentlyAudible() { | 2586 bool WebContentsImpl::WasRecentlyAudible() { |
(...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4622 node->render_manager()->ResumeResponseDeferredAtStart(); | 4624 node->render_manager()->ResumeResponseDeferredAtStart(); |
4623 } | 4625 } |
4624 | 4626 |
4625 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4627 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4626 force_disable_overscroll_content_ = force_disable; | 4628 force_disable_overscroll_content_ = force_disable; |
4627 if (view_) | 4629 if (view_) |
4628 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4630 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4629 } | 4631 } |
4630 | 4632 |
4631 } // namespace content | 4633 } // namespace content |
OLD | NEW |