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 "chrome/test/base/ui_test_utils.h" | 5 #include "chrome/test/base/ui_test_utils.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 content::Source<WebContents>(parent_tab)); | 106 content::Source<WebContents>(parent_tab)); |
107 message_loop_runner_ = new content::MessageLoopRunner; | 107 message_loop_runner_ = new content::MessageLoopRunner; |
108 message_loop_runner_->Run(); | 108 message_loop_runner_->Run(); |
109 } | 109 } |
110 | 110 |
111 int active_match_ordinal() const { return active_match_ordinal_; } | 111 int active_match_ordinal() const { return active_match_ordinal_; } |
112 int number_of_matches() const { return number_of_matches_; } | 112 int number_of_matches() const { return number_of_matches_; } |
113 gfx::Rect selection_rect() const { return selection_rect_; } | 113 gfx::Rect selection_rect() const { return selection_rect_; } |
114 | 114 |
115 virtual void Observe(int type, const content::NotificationSource& source, | 115 virtual void Observe(int type, const content::NotificationSource& source, |
116 const content::NotificationDetails& details) { | 116 const content::NotificationDetails& details) OVERRIDE { |
117 if (type == chrome::NOTIFICATION_FIND_RESULT_AVAILABLE) { | 117 if (type == chrome::NOTIFICATION_FIND_RESULT_AVAILABLE) { |
118 content::Details<FindNotificationDetails> find_details(details); | 118 content::Details<FindNotificationDetails> find_details(details); |
119 if (find_details->request_id() == current_find_request_id_) { | 119 if (find_details->request_id() == current_find_request_id_) { |
120 // We get multiple responses and one of those will contain the ordinal. | 120 // We get multiple responses and one of those will contain the ordinal. |
121 // This message comes to us before the final update is sent. | 121 // This message comes to us before the final update is sent. |
122 if (find_details->active_match_ordinal() > -1) { | 122 if (find_details->active_match_ordinal() > -1) { |
123 active_match_ordinal_ = find_details->active_match_ordinal(); | 123 active_match_ordinal_ = find_details->active_match_ordinal(); |
124 selection_rect_ = find_details->selection_rect(); | 124 selection_rect_ = find_details->selection_rect(); |
125 } | 125 } |
126 if (find_details->final_update()) { | 126 if (find_details->final_update()) { |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 void HistoryEnumerator::HistoryQueryComplete( | 686 void HistoryEnumerator::HistoryQueryComplete( |
687 const base::Closure& quit_task, | 687 const base::Closure& quit_task, |
688 HistoryService::Handle request_handle, | 688 HistoryService::Handle request_handle, |
689 history::QueryResults* results) { | 689 history::QueryResults* results) { |
690 for (size_t i = 0; i < results->size(); ++i) | 690 for (size_t i = 0; i < results->size(); ++i) |
691 urls_.push_back((*results)[i].url()); | 691 urls_.push_back((*results)[i].url()); |
692 quit_task.Run(); | 692 quit_task.Run(); |
693 } | 693 } |
694 | 694 |
695 } // namespace ui_test_utils | 695 } // namespace ui_test_utils |
OLD | NEW |