Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: components/guest_view/browser/guest_view_base.cc

Issue 2723253002: Fix beep when navigating/closing a page with find bar open
Patch Set: android Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/guest_view/browser/guest_view_base.h" 5 #include "components/guest_view/browser/guest_view_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 721
722 bool GuestViewBase::ShouldResumeRequestsForCreatedWindow() { 722 bool GuestViewBase::ShouldResumeRequestsForCreatedWindow() {
723 return false; 723 return false;
724 } 724 }
725 725
726 void GuestViewBase::FindReply(WebContents* source, 726 void GuestViewBase::FindReply(WebContents* source,
727 int request_id, 727 int request_id,
728 int number_of_matches, 728 int number_of_matches,
729 const gfx::Rect& selection_rect, 729 const gfx::Rect& selection_rect,
730 int active_match_ordinal, 730 int active_match_ordinal,
731 bool final_update) { 731 bool final_update,
732 bool was_frame_removal) {
732 if (ShouldHandleFindRequestsForEmbedder() && 733 if (ShouldHandleFindRequestsForEmbedder() &&
733 attached() && embedder_web_contents()->GetDelegate()) { 734 attached() && embedder_web_contents()->GetDelegate()) {
734 embedder_web_contents()->GetDelegate()->FindReply(embedder_web_contents(), 735 embedder_web_contents()->GetDelegate()->FindReply(
735 request_id, 736 embedder_web_contents(), request_id, number_of_matches, selection_rect,
736 number_of_matches, 737 active_match_ordinal, final_update, was_frame_removal);
737 selection_rect,
738 active_match_ordinal,
739 final_update);
740 } 738 }
741 } 739 }
742 740
743 content::RenderWidgetHost* GuestViewBase::GetOwnerRenderWidgetHost() { 741 content::RenderWidgetHost* GuestViewBase::GetOwnerRenderWidgetHost() {
744 // We assume guests live inside an owner RenderFrame but the RenderFrame may 742 // We assume guests live inside an owner RenderFrame but the RenderFrame may
745 // not be cross-process. In case a type of guest should be allowed to be 743 // not be cross-process. In case a type of guest should be allowed to be
746 // embedded in a cross-process frame, this method should be overrode for that 744 // embedded in a cross-process frame, this method should be overrode for that
747 // specific guest type. For all other guests, the owner RenderWidgetHost is 745 // specific guest type. For all other guests, the owner RenderWidgetHost is
748 // that of the owner WebContents. 746 // that of the owner WebContents.
749 if (GetOwnerWebContents() && 747 if (GetOwnerWebContents() &&
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 924
927 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 925 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
928 bool due_to_auto_resize) { 926 bool due_to_auto_resize) {
929 if (due_to_auto_resize) 927 if (due_to_auto_resize)
930 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 928 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
931 DispatchOnResizeEvent(guest_size_, new_size); 929 DispatchOnResizeEvent(guest_size_, new_size);
932 guest_size_ = new_size; 930 guest_size_ = new_size;
933 } 931 }
934 932
935 } // namespace guest_view 933 } // namespace guest_view
OLDNEW
« no previous file with comments | « components/guest_view/browser/guest_view_base.h ('k') | content/browser/download/mhtml_generation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698