| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" | 64 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
| 65 #include "chrome/browser/ui/webui/ntp/most_visited_handler.h" | 65 #include "chrome/browser/ui/webui/ntp/most_visited_handler.h" |
| 66 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 66 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 67 #include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h" | 67 #include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h" |
| 68 #include "chrome/common/automation_constants.h" | 68 #include "chrome/common/automation_constants.h" |
| 69 #include "chrome/common/automation_messages.h" | 69 #include "chrome/common/automation_messages.h" |
| 70 #include "chrome/common/chrome_notification_types.h" | 70 #include "chrome/common/chrome_notification_types.h" |
| 71 #include "chrome/common/content_settings_types.h" | 71 #include "chrome/common/content_settings_types.h" |
| 72 #include "chrome/common/extensions/extension.h" | 72 #include "chrome/common/extensions/extension.h" |
| 73 #include "chrome/common/extensions/manifest.h" | 73 #include "chrome/common/extensions/manifest.h" |
| 74 #include "chrome/common/view_type.h" | |
| 75 #include "content/public/browser/dom_operation_notification_details.h" | 74 #include "content/public/browser/dom_operation_notification_details.h" |
| 76 #include "content/public/browser/navigation_controller.h" | 75 #include "content/public/browser/navigation_controller.h" |
| 77 #include "content/public/browser/notification_service.h" | 76 #include "content/public/browser/notification_service.h" |
| 78 #include "content/public/browser/render_process_host.h" | 77 #include "content/public/browser/render_process_host.h" |
| 79 #include "content/public/browser/render_view_host.h" | 78 #include "content/public/browser/render_view_host.h" |
| 80 #include "content/public/browser/web_contents.h" | 79 #include "content/public/browser/web_contents.h" |
| 81 #include "content/public/common/process_type.h" | 80 #include "content/public/common/process_type.h" |
| 81 #include "extensions/common/view_type.h" |
| 82 #include "googleurl/src/gurl.h" | 82 #include "googleurl/src/gurl.h" |
| 83 #include "ui/gfx/codec/png_codec.h" | 83 #include "ui/gfx/codec/png_codec.h" |
| 84 #include "ui/gfx/rect.h" | 84 #include "ui/gfx/rect.h" |
| 85 | 85 |
| 86 using content::BrowserThread; | 86 using content::BrowserThread; |
| 87 using content::DomOperationNotificationDetails; | 87 using content::DomOperationNotificationDetails; |
| 88 using content::DownloadItem; | 88 using content::DownloadItem; |
| 89 using content::DownloadManager; | 89 using content::DownloadManager; |
| 90 using content::NavigationController; | 90 using content::NavigationController; |
| 91 using content::RenderViewHost; | 91 using content::RenderViewHost; |
| (...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2765 const content::NotificationSource& source, | 2765 const content::NotificationSource& source, |
| 2766 const content::NotificationDetails& details) { | 2766 const content::NotificationDetails& details) { |
| 2767 if (!automation_) { | 2767 if (!automation_) { |
| 2768 delete this; | 2768 delete this; |
| 2769 return; | 2769 return; |
| 2770 } | 2770 } |
| 2771 | 2771 |
| 2772 extensions::ExtensionHost* host = | 2772 extensions::ExtensionHost* host = |
| 2773 content::Details<extensions::ExtensionHost>(details).ptr(); | 2773 content::Details<extensions::ExtensionHost>(details).ptr(); |
| 2774 if (host->extension_id() == extension_id_ && | 2774 if (host->extension_id() == extension_id_ && |
| 2775 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 2775 host->extension_host_type() == extensions::VIEW_TYPE_EXTENSION_POPUP) { |
| 2776 AutomationJSONReply(automation_, reply_message_.release()) | 2776 AutomationJSONReply(automation_, reply_message_.release()) |
| 2777 .SendSuccess(NULL); | 2777 .SendSuccess(NULL); |
| 2778 delete this; | 2778 delete this; |
| 2779 } | 2779 } |
| 2780 } | 2780 } |
| 2781 | 2781 |
| 2782 #if defined(OS_LINUX) | 2782 #if defined(OS_LINUX) |
| 2783 WindowMaximizedObserver::WindowMaximizedObserver( | 2783 WindowMaximizedObserver::WindowMaximizedObserver( |
| 2784 AutomationProvider* automation, | 2784 AutomationProvider* automation, |
| 2785 IPC::Message* reply_message) | 2785 IPC::Message* reply_message) |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2849 if (automation_) { | 2849 if (automation_) { |
| 2850 AutomationJSONReply(automation_, reply_message_.release()) | 2850 AutomationJSONReply(automation_, reply_message_.release()) |
| 2851 .SendSuccess(NULL); | 2851 .SendSuccess(NULL); |
| 2852 } | 2852 } |
| 2853 delete this; | 2853 delete this; |
| 2854 } | 2854 } |
| 2855 } else { | 2855 } else { |
| 2856 NOTREACHED(); | 2856 NOTREACHED(); |
| 2857 } | 2857 } |
| 2858 } | 2858 } |
| OLD | NEW |