Add ability to gather metrics to BubbleManager.
[chromium-blink-merge.git] / chrome / browser / ui / find_bar / find_notification_details.h
blob51ae09d0945e79b71576855467341fe8242f8724
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
8 #include "base/basictypes.h"
9 #include "ui/gfx/geometry/rect.h"
11 class FindNotificationDetails {
12 public:
13 FindNotificationDetails(int request_id,
14 int number_of_matches,
15 const gfx::Rect& selection_rect,
16 int active_match_ordinal,
17 bool final_update)
18 : request_id_(request_id),
19 number_of_matches_(number_of_matches),
20 selection_rect_(selection_rect),
21 active_match_ordinal_(active_match_ordinal),
22 final_update_(final_update) {}
24 FindNotificationDetails()
25 : request_id_(0),
26 number_of_matches_(-1),
27 active_match_ordinal_(-1),
28 final_update_(false) {}
30 ~FindNotificationDetails() {}
32 int request_id() const { return request_id_; }
34 int number_of_matches() const { return number_of_matches_; }
36 gfx::Rect selection_rect() const { return selection_rect_; }
38 int active_match_ordinal() const { return active_match_ordinal_; }
40 bool final_update() const { return final_update_; }
42 private:
43 int request_id_; // The find-in-page request whose results we're returning.
44 int number_of_matches_; // How many matches were found.
45 gfx::Rect selection_rect_; // Where selection occurred (screen coordinate).
46 int active_match_ordinal_; // The ordinal of the currently selected match.
47 bool final_update_; // Whether this is the last Find Result update.
50 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_