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 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2515 return_value.Set("notifications", list); | 2515 return_value.Set("notifications", list); |
2516 BalloonCollection::Balloons::const_iterator balloon_iter; | 2516 BalloonCollection::Balloons::const_iterator balloon_iter; |
2517 for (balloon_iter = balloons.begin(); balloon_iter != balloons.end(); | 2517 for (balloon_iter = balloons.begin(); balloon_iter != balloons.end(); |
2518 ++balloon_iter) { | 2518 ++balloon_iter) { |
2519 base::DictionaryValue* note = NotificationToJson( | 2519 base::DictionaryValue* note = NotificationToJson( |
2520 &(*balloon_iter)->notification()); | 2520 &(*balloon_iter)->notification()); |
2521 BalloonView* view = (*balloon_iter)->view(); | 2521 BalloonView* view = (*balloon_iter)->view(); |
2522 note->SetInteger( | 2522 note->SetInteger( |
2523 "pid", | 2523 "pid", |
2524 base::GetProcId(view->GetHost()->web_contents()->GetRenderViewHost()-> | 2524 base::GetProcId(view->GetHost()->web_contents()->GetRenderViewHost()-> |
2525 process()-> GetHandle())); | 2525 GetProcess()-> GetHandle())); |
2526 list->Append(note); | 2526 list->Append(note); |
2527 } | 2527 } |
2528 std::vector<const Notification*> queued_notes; | 2528 std::vector<const Notification*> queued_notes; |
2529 manager->GetQueuedNotificationsForTesting(&queued_notes); | 2529 manager->GetQueuedNotificationsForTesting(&queued_notes); |
2530 std::vector<const Notification*>::const_iterator queued_iter; | 2530 std::vector<const Notification*>::const_iterator queued_iter; |
2531 for (queued_iter = queued_notes.begin(); queued_iter != queued_notes.end(); | 2531 for (queued_iter = queued_notes.begin(); queued_iter != queued_notes.end(); |
2532 ++queued_iter) { | 2532 ++queued_iter) { |
2533 list->Append(NotificationToJson(*queued_iter)); | 2533 list->Append(NotificationToJson(*queued_iter)); |
2534 } | 2534 } |
2535 AutomationJSONReply(automation_, | 2535 AutomationJSONReply(automation_, |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3208 } | 3208 } |
3209 | 3209 |
3210 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3210 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
3211 if (host->extension_id() == extension_id_ && | 3211 if (host->extension_id() == extension_id_ && |
3212 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3212 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
3213 AutomationJSONReply(automation_, reply_message_.release()) | 3213 AutomationJSONReply(automation_, reply_message_.release()) |
3214 .SendSuccess(NULL); | 3214 .SendSuccess(NULL); |
3215 delete this; | 3215 delete this; |
3216 } | 3216 } |
3217 } | 3217 } |
OLD | NEW |