OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/automation/browser_proxy.h" | 5 #include "chrome/test/automation/browser_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/json/json_writer.h" | |
11 #include "base/logging.h" | 10 #include "base/logging.h" |
12 #include "base/platform_thread.h" | 11 #include "base/platform_thread.h" |
13 #include "base/time.h" | 12 #include "base/time.h" |
14 #include "chrome/common/automation_constants.h" | 13 #include "chrome/common/automation_constants.h" |
15 #include "chrome/common/automation_messages.h" | 14 #include "chrome/common/automation_messages.h" |
16 #include "chrome/test/automation/autocomplete_edit_proxy.h" | 15 #include "chrome/test/automation/autocomplete_edit_proxy.h" |
17 #include "chrome/test/automation/automation_proxy.h" | 16 #include "chrome/test/automation/automation_proxy.h" |
18 #include "chrome/test/automation/tab_proxy.h" | 17 #include "chrome/test/automation/tab_proxy.h" |
19 #include "chrome/test/automation/window_proxy.h" | 18 #include "chrome/test/automation/window_proxy.h" |
20 #include "gfx/point.h" | 19 #include "gfx/point.h" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 if (!is_valid()) | 336 if (!is_valid()) |
338 return false; | 337 return false; |
339 bool result = false; | 338 bool result = false; |
340 sender_->Send(new AutomationMsg_ReparentBookmark(0, handle_, | 339 sender_->Send(new AutomationMsg_ReparentBookmark(0, handle_, |
341 id, new_parent_id, | 340 id, new_parent_id, |
342 index, | 341 index, |
343 &result)); | 342 &result)); |
344 return result; | 343 return result; |
345 } | 344 } |
346 | 345 |
347 bool BrowserProxy::SetBookmarkTitle(int64 id, std::wstring& title) { | 346 bool BrowserProxy::SetBookmarkTitle(int64 id, const std::wstring& title) { |
348 if (!is_valid()) | 347 if (!is_valid()) |
349 return false; | 348 return false; |
350 bool result = false; | 349 bool result = false; |
351 sender_->Send(new AutomationMsg_SetBookmarkTitle(0, handle_, | 350 sender_->Send(new AutomationMsg_SetBookmarkTitle(0, handle_, |
352 id, title, | 351 id, title, |
353 &result)); | 352 &result)); |
354 return result; | 353 return result; |
355 } | 354 } |
356 | 355 |
357 bool BrowserProxy::SetBookmarkURL(int64 id, const GURL& url) { | 356 bool BrowserProxy::SetBookmarkURL(int64 id, const GURL& url) { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 if (i == 0) | 643 if (i == 0) |
645 *min_start_time = start_ms; | 644 *min_start_time = start_ms; |
646 | 645 |
647 *min_start_time = std::min(start_ms, *min_start_time); | 646 *min_start_time = std::min(start_ms, *min_start_time); |
648 *max_stop_time = std::max(stop_ms, *max_stop_time); | 647 *max_stop_time = std::max(stop_ms, *max_stop_time); |
649 stop_times->push_back(stop_ms); | 648 stop_times->push_back(stop_ms); |
650 } | 649 } |
651 std::sort(stop_times->begin(), stop_times->end()); | 650 std::sort(stop_times->begin(), stop_times->end()); |
652 return true; | 651 return true; |
653 } | 652 } |
OLD | NEW |