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 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3069 | 3069 |
3070 void ExtensionPopupObserver::Observe( | 3070 void ExtensionPopupObserver::Observe( |
3071 int type, | 3071 int type, |
3072 const content::NotificationSource& source, | 3072 const content::NotificationSource& source, |
3073 const content::NotificationDetails& details) { | 3073 const content::NotificationDetails& details) { |
3074 if (!automation_) { | 3074 if (!automation_) { |
3075 delete this; | 3075 delete this; |
3076 return; | 3076 return; |
3077 } | 3077 } |
3078 | 3078 |
3079 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3079 extensions::ExtensionHost* host = |
| 3080 content::Details<extensions::ExtensionHost>(details).ptr(); |
3080 if (host->extension_id() == extension_id_ && | 3081 if (host->extension_id() == extension_id_ && |
3081 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3082 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
3082 AutomationJSONReply(automation_, reply_message_.release()) | 3083 AutomationJSONReply(automation_, reply_message_.release()) |
3083 .SendSuccess(NULL); | 3084 .SendSuccess(NULL); |
3084 delete this; | 3085 delete this; |
3085 } | 3086 } |
3086 } | 3087 } |
3087 | 3088 |
3088 #if defined(OS_LINUX) | 3089 #if defined(OS_LINUX) |
3089 WindowMaximizedObserver::WindowMaximizedObserver( | 3090 WindowMaximizedObserver::WindowMaximizedObserver( |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3154 if (automation_) { | 3155 if (automation_) { |
3155 AutomationJSONReply(automation_, reply_message_.release()) | 3156 AutomationJSONReply(automation_, reply_message_.release()) |
3156 .SendSuccess(NULL); | 3157 .SendSuccess(NULL); |
3157 } | 3158 } |
3158 delete this; | 3159 delete this; |
3159 } | 3160 } |
3160 } else { | 3161 } else { |
3161 NOTREACHED(); | 3162 NOTREACHED(); |
3162 } | 3163 } |
3163 } | 3164 } |
OLD | NEW |