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/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 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2500 return_value.Set("notifications", list); | 2500 return_value.Set("notifications", list); |
2501 BalloonCollection::Balloons::const_iterator balloon_iter; | 2501 BalloonCollection::Balloons::const_iterator balloon_iter; |
2502 for (balloon_iter = balloons.begin(); balloon_iter != balloons.end(); | 2502 for (balloon_iter = balloons.begin(); balloon_iter != balloons.end(); |
2503 ++balloon_iter) { | 2503 ++balloon_iter) { |
2504 base::DictionaryValue* note = NotificationToJson( | 2504 base::DictionaryValue* note = NotificationToJson( |
2505 &(*balloon_iter)->notification()); | 2505 &(*balloon_iter)->notification()); |
2506 BalloonView* view = (*balloon_iter)->view(); | 2506 BalloonView* view = (*balloon_iter)->view(); |
2507 note->SetInteger( | 2507 note->SetInteger( |
2508 "pid", | 2508 "pid", |
2509 base::GetProcId(view->GetHost()->web_contents()->GetRenderViewHost()-> | 2509 base::GetProcId(view->GetHost()->web_contents()->GetRenderViewHost()-> |
2510 process()-> GetHandle())); | 2510 GetProcess()-> GetHandle())); |
2511 list->Append(note); | 2511 list->Append(note); |
2512 } | 2512 } |
2513 std::vector<const Notification*> queued_notes; | 2513 std::vector<const Notification*> queued_notes; |
2514 manager->GetQueuedNotificationsForTesting(&queued_notes); | 2514 manager->GetQueuedNotificationsForTesting(&queued_notes); |
2515 std::vector<const Notification*>::const_iterator queued_iter; | 2515 std::vector<const Notification*>::const_iterator queued_iter; |
2516 for (queued_iter = queued_notes.begin(); queued_iter != queued_notes.end(); | 2516 for (queued_iter = queued_notes.begin(); queued_iter != queued_notes.end(); |
2517 ++queued_iter) { | 2517 ++queued_iter) { |
2518 list->Append(NotificationToJson(*queued_iter)); | 2518 list->Append(NotificationToJson(*queued_iter)); |
2519 } | 2519 } |
2520 AutomationJSONReply(automation_, | 2520 AutomationJSONReply(automation_, |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3193 } | 3193 } |
3194 | 3194 |
3195 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3195 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
3196 if (host->extension_id() == extension_id_ && | 3196 if (host->extension_id() == extension_id_ && |
3197 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3197 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
3198 AutomationJSONReply(automation_, reply_message_.release()) | 3198 AutomationJSONReply(automation_, reply_message_.release()) |
3199 .SendSuccess(NULL); | 3199 .SendSuccess(NULL); |
3200 delete this; | 3200 delete this; |
3201 } | 3201 } |
3202 } | 3202 } |
OLD | NEW |