Chromium Code Reviews| 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 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3017 } | 3017 } |
| 3018 | 3018 |
| 3019 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3019 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
| 3020 if (host->extension_id() == extension_id_ && | 3020 if (host->extension_id() == extension_id_ && |
| 3021 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3021 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 3022 AutomationJSONReply(automation_, reply_message_.release()) | 3022 AutomationJSONReply(automation_, reply_message_.release()) |
| 3023 .SendSuccess(NULL); | 3023 .SendSuccess(NULL); |
| 3024 delete this; | 3024 delete this; |
| 3025 } | 3025 } |
| 3026 } | 3026 } |
| 3027 | |
| 3028 WindowMaximizedObserver::WindowMaximizedObserver( | |
| 3029 AutomationProvider* automation, | |
| 3030 IPC::Message* reply_message) | |
| 3031 : automation_(automation->AsWeakPtr()), | |
| 3032 reply_message_(reply_message) { | |
| 3033 registrar_.Add(this, chrome::NOTIFICATION_WINDOW_MAXIMIZED, | |
| 3034 content::NotificationService::AllSources()); | |
| 3035 } | |
| 3036 | |
| 3037 WindowMaximizedObserver::~WindowMaximizedObserver() {} | |
| 3038 | |
| 3039 void WindowMaximizedObserver::Observe( | |
| 3040 int type, | |
| 3041 const content::NotificationSource& source, | |
| 3042 const content::NotificationDetails& details) { | |
| 3043 | |
|
kkania
2012/05/30 01:03:58
no newline here
zori
2012/05/31 23:38:22
Done.
| |
| 3044 DCHECK_EQ(chrome::NOTIFICATION_WINDOW_MAXIMIZED, type); | |
| 3045 | |
| 3046 if (automation_) { | |
| 3047 AutomationJSONReply(automation_, reply_message_.release()) | |
| 3048 .SendSuccess(NULL); | |
| 3049 } | |
| 3050 delete this; | |
| 3051 } | |
| 3052 | |
| OLD | NEW |