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. 4 5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_ 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_ 7 #pragma once 8 9 #include "base/basictypes.h" 10 #include "ui/gfx/rect.h" 11 12 class FindNotificationDetails { 13 public: 14 FindNotificationDetails(int request_id, 15 int number_of_matches, 16 const gfx::Rect& selection_rect, 17 int active_match_ordinal, 18 bool final_update) 19 : request_id_(request_id), 20 number_of_matches_(number_of_matches), 21 selection_rect_(selection_rect), 22 active_match_ordinal_(active_match_ordinal), 23 final_update_(final_update) {} 24 25 FindNotificationDetails() 26 : request_id_(0), 27 number_of_matches_(-1), 28 active_match_ordinal_(-1), 29 final_update_(false) {} 30 31 ~FindNotificationDetails() {} 32 33 int request_id() const { return request_id_; } 34 35 int number_of_matches() const { return number_of_matches_; } 36 37 gfx::Rect selection_rect() const { return selection_rect_; } 38 39 int active_match_ordinal() const { return active_match_ordinal_; } 40 41 bool final_update() const { return final_update_; } 42 43 private: 44 int request_id_; // The find-in-page request whose results we're returning. 45 int number_of_matches_; // How many matches were found. 46 gfx::Rect selection_rect_; // Where selection occurred (screen coordinate). 47 int active_match_ordinal_; // The ordinal of the currently selected match. 48 bool final_update_; // Whether this is the last Find Result update. 49 }; 50 51 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_ 52