| 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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 case IDC_CLOSE_TAB: { | 1073 case IDC_CLOSE_TAB: { |
| 1074 TabClosedNotificationObserver* observer = | 1074 TabClosedNotificationObserver* observer = |
| 1075 new TabClosedNotificationObserver(automation, true, reply_message); | 1075 new TabClosedNotificationObserver(automation, true, reply_message); |
| 1076 observer->set_for_browser_command(true); | 1076 observer->set_for_browser_command(true); |
| 1077 break; | 1077 break; |
| 1078 } | 1078 } |
| 1079 case IDC_BACK: | 1079 case IDC_BACK: |
| 1080 case IDC_FORWARD: | 1080 case IDC_FORWARD: |
| 1081 case IDC_RELOAD: { | 1081 case IDC_RELOAD: { |
| 1082 new NavigationNotificationObserver( | 1082 new NavigationNotificationObserver( |
| 1083 &browser->GetSelectedTabContents()->GetController(), | 1083 &browser->GetSelectedWebContents()->GetController(), |
| 1084 automation, reply_message, 1, false, false); | 1084 automation, reply_message, 1, false, false); |
| 1085 break; | 1085 break; |
| 1086 } | 1086 } |
| 1087 default: { | 1087 default: { |
| 1088 ExecuteBrowserCommandObserver* observer = | 1088 ExecuteBrowserCommandObserver* observer = |
| 1089 new ExecuteBrowserCommandObserver(automation, reply_message); | 1089 new ExecuteBrowserCommandObserver(automation, reply_message); |
| 1090 if (!observer->Register(command)) { | 1090 if (!observer->Register(command)) { |
| 1091 delete observer; | 1091 delete observer; |
| 1092 result = false; | 1092 result = false; |
| 1093 } | 1093 } |
| (...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3098 } | 3098 } |
| 3099 | 3099 |
| 3100 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3100 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
| 3101 if (host->extension_id() == extension_id_ && | 3101 if (host->extension_id() == extension_id_ && |
| 3102 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3102 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 3103 AutomationJSONReply(automation_, reply_message_.release()) | 3103 AutomationJSONReply(automation_, reply_message_.release()) |
| 3104 .SendSuccess(NULL); | 3104 .SendSuccess(NULL); |
| 3105 delete this; | 3105 delete this; |
| 3106 } | 3106 } |
| 3107 } | 3107 } |
| OLD | NEW |