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

Side by Side Diff: chrome/browser/ui/find_bar/find_notification_details.h

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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_ 5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_ 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
7 7
8 #include "ui/gfx/geometry/rect.h" 8 #include "ui/gfx/geometry/rect.h"
9 9
10 class FindNotificationDetails { 10 class FindNotificationDetails {
11 public: 11 public:
12 FindNotificationDetails(int request_id, 12 FindNotificationDetails(int request_id,
13 int number_of_matches, 13 int number_of_matches,
14 const gfx::Rect& selection_rect, 14 const gfx::Rect& selection_rect,
15 int active_match_ordinal, 15 int active_match_ordinal,
16 bool final_update) 16 bool final_update,
17 : request_id_(request_id), 17 bool was_frame_removal)
18 number_of_matches_(number_of_matches), 18 : request_id_(request_id),
19 selection_rect_(selection_rect), 19 number_of_matches_(number_of_matches),
20 active_match_ordinal_(active_match_ordinal), 20 selection_rect_(selection_rect),
21 final_update_(final_update) {} 21 active_match_ordinal_(active_match_ordinal),
22 final_update_(final_update),
23 was_frame_removal_(was_frame_removal) {}
22 24
23 FindNotificationDetails() 25 FindNotificationDetails()
24 : request_id_(0), 26 : request_id_(0),
25 number_of_matches_(-1), 27 number_of_matches_(-1),
26 active_match_ordinal_(-1), 28 active_match_ordinal_(-1),
27 final_update_(false) {} 29 final_update_(false),
30 was_frame_removal_(false) {}
28 31
29 ~FindNotificationDetails() {} 32 ~FindNotificationDetails() {}
30 33
31 int request_id() const { return request_id_; } 34 int request_id() const { return request_id_; }
32 35
33 int number_of_matches() const { return number_of_matches_; } 36 int number_of_matches() const { return number_of_matches_; }
34 37
35 gfx::Rect selection_rect() const { return selection_rect_; } 38 gfx::Rect selection_rect() const { return selection_rect_; }
36 39
37 int active_match_ordinal() const { return active_match_ordinal_; } 40 int active_match_ordinal() const { return active_match_ordinal_; }
38 41
39 bool final_update() const { return final_update_; } 42 bool final_update() const { return final_update_; }
40 43
44 bool was_frame_removal() const { return was_frame_removal_; }
45
41 private: 46 private:
42 int request_id_; // The find-in-page request whose results we're returning. 47 int request_id_; // The find-in-page request whose results we're returning.
43 int number_of_matches_; // How many matches were found. 48 int number_of_matches_; // How many matches were found.
44 gfx::Rect selection_rect_; // Where selection occurred (screen coordinate). 49 gfx::Rect selection_rect_; // Where selection occurred (screen coordinate).
45 int active_match_ordinal_; // The ordinal of the currently selected match. 50 int active_match_ordinal_; // The ordinal of the currently selected match.
46 bool final_update_; // Whether this is the last Find Result update. 51 bool final_update_; // Whether this is the last Find Result update.
52 bool was_frame_removal_; // Whether the update is due to a frame being
53 // removed.
47 }; 54 };
48 55
49 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_ 56 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | chrome/browser/ui/find_bar/find_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698