OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/automation/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 DictionaryValue* InitialLoadObserver::GetTimingInformation() const { | 134 DictionaryValue* InitialLoadObserver::GetTimingInformation() const { |
135 ListValue* items = new ListValue; | 135 ListValue* items = new ListValue; |
136 for (TabTimeMap::const_iterator it = loading_tabs_.begin(); | 136 for (TabTimeMap::const_iterator it = loading_tabs_.begin(); |
137 it != loading_tabs_.end(); | 137 it != loading_tabs_.end(); |
138 ++it) { | 138 ++it) { |
139 DictionaryValue* item = new DictionaryValue; | 139 DictionaryValue* item = new DictionaryValue; |
140 base::TimeDelta delta_start = it->second.start_time() - init_time_; | 140 base::TimeDelta delta_start = it->second.start_time() - init_time_; |
141 | 141 |
142 item->SetDouble("load_start_ms", delta_start.InMillisecondsF()); | 142 item->SetDouble("load_start_ms", delta_start.InMillisecondsF()); |
143 if (it->second.stop_time().is_null()) { | 143 if (it->second.stop_time().is_null()) { |
144 item->Set("load_stop_ms", Value::CreateNullValue()); | 144 item->Set("load_stop_ms", base::NullValue()); |
145 } else { | 145 } else { |
146 base::TimeDelta delta_stop = it->second.stop_time() - init_time_; | 146 base::TimeDelta delta_stop = it->second.stop_time() - init_time_; |
147 item->SetDouble("load_stop_ms", delta_stop.InMillisecondsF()); | 147 item->SetDouble("load_stop_ms", delta_stop.InMillisecondsF()); |
148 } | 148 } |
149 items->Append(item); | 149 items->Append(item); |
150 } | 150 } |
151 DictionaryValue* return_value = new DictionaryValue; | 151 DictionaryValue* return_value = new DictionaryValue; |
152 return_value->Set("tabs", items); | 152 return_value->Set("tabs", items); |
153 return return_value; | 153 return return_value; |
154 } | 154 } |
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2614 void DragTargetDropAckNotificationObserver::Observe( | 2614 void DragTargetDropAckNotificationObserver::Observe( |
2615 int type, | 2615 int type, |
2616 const NotificationSource& source, | 2616 const NotificationSource& source, |
2617 const NotificationDetails& details) { | 2617 const NotificationDetails& details) { |
2618 if (automation_) { | 2618 if (automation_) { |
2619 AutomationJSONReply(automation_, | 2619 AutomationJSONReply(automation_, |
2620 reply_message_.release()).SendSuccess(NULL); | 2620 reply_message_.release()).SendSuccess(NULL); |
2621 } | 2621 } |
2622 delete this; | 2622 delete this; |
2623 } | 2623 } |
OLD | NEW |