Chromium Code Reviews| 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 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2716 return download_id; | 2716 return download_id; |
| 2717 } | 2717 } |
| 2718 | 2718 |
| 2719 bool WebContentsImpl::IsSubframe() const { | 2719 bool WebContentsImpl::IsSubframe() const { |
| 2720 return is_subframe_; | 2720 return is_subframe_; |
| 2721 } | 2721 } |
| 2722 | 2722 |
| 2723 void WebContentsImpl::Find(int request_id, | 2723 void WebContentsImpl::Find(int request_id, |
| 2724 const base::string16& search_text, | 2724 const base::string16& search_text, |
| 2725 const blink::WebFindOptions& options) { | 2725 const blink::WebFindOptions& options) { |
| 2726 // Cowardly refuse to search for no text. | |
| 2727 if (search_text.empty()) { | |
| 2728 NOTREACHED(); | |
|
Charlie Reis
2015/09/28 19:35:17
I take it there's some other code that returns ear
Lei Zhang
2015/09/28 20:01:51
Yes, the normal find text box has a check.
| |
| 2729 return; | |
| 2730 } | |
| 2731 | |
| 2726 // See if a top level browser plugin handles the find request first. | 2732 // See if a top level browser plugin handles the find request first. |
| 2727 if (browser_plugin_embedder_ && | 2733 if (browser_plugin_embedder_ && |
| 2728 browser_plugin_embedder_->Find(request_id, search_text, options)) { | 2734 browser_plugin_embedder_->Find(request_id, search_text, options)) { |
| 2729 return; | 2735 return; |
| 2730 } | 2736 } |
| 2731 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); | 2737 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); |
| 2732 } | 2738 } |
| 2733 | 2739 |
| 2734 void WebContentsImpl::StopFinding(StopFindAction action) { | 2740 void WebContentsImpl::StopFinding(StopFindAction action) { |
| 2735 // See if a top level browser plugin handles the stop finding request first. | 2741 // See if a top level browser plugin handles the stop finding request first. |
| (...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4641 return NULL; | 4647 return NULL; |
| 4642 } | 4648 } |
| 4643 | 4649 |
| 4644 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4650 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4645 force_disable_overscroll_content_ = force_disable; | 4651 force_disable_overscroll_content_ = force_disable; |
| 4646 if (view_) | 4652 if (view_) |
| 4647 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4653 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4648 } | 4654 } |
| 4649 | 4655 |
| 4650 } // namespace content | 4656 } // namespace content |
| OLD | NEW |