| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/common/chrome_notification_types.h" | 71 #include "chrome/common/chrome_notification_types.h" |
| 72 #include "chrome/common/content_settings_types.h" | 72 #include "chrome/common/content_settings_types.h" |
| 73 #include "chrome/common/extensions/extension.h" | 73 #include "chrome/common/extensions/extension.h" |
| 74 #include "content/browser/download/save_package.h" | 74 #include "content/browser/download/save_package.h" |
| 75 #include "content/browser/renderer_host/render_view_host.h" | 75 #include "content/browser/renderer_host/render_view_host.h" |
| 76 #include "content/browser/tab_contents/navigation_controller.h" | 76 #include "content/browser/tab_contents/navigation_controller.h" |
| 77 #include "content/browser/tab_contents/tab_contents.h" | 77 #include "content/browser/tab_contents/tab_contents.h" |
| 78 #include "content/common/child_process_info.h" | 78 #include "content/common/child_process_info.h" |
| 79 #include "content/public/browser/notification_service.h" | 79 #include "content/public/browser/notification_service.h" |
| 80 #include "content/public/browser/render_process_host.h" | 80 #include "content/public/browser/render_process_host.h" |
| 81 #include "content/public/common/process_type.h" |
| 81 #include "googleurl/src/gurl.h" | 82 #include "googleurl/src/gurl.h" |
| 82 #include "third_party/skia/include/core/SkBitmap.h" | 83 #include "third_party/skia/include/core/SkBitmap.h" |
| 83 #include "ui/gfx/codec/png_codec.h" | 84 #include "ui/gfx/codec/png_codec.h" |
| 84 #include "ui/gfx/rect.h" | 85 #include "ui/gfx/rect.h" |
| 85 | 86 |
| 86 using content::BrowserThread; | 87 using content::BrowserThread; |
| 87 | 88 |
| 88 // Holds onto start and stop timestamps for a particular tab | 89 // Holds onto start and stop timestamps for a particular tab |
| 89 class InitialLoadObserver::TabTime { | 90 class InitialLoadObserver::TabTime { |
| 90 public: | 91 public: |
| (...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2859 | 2860 |
| 2860 proc_data->SetString("version", iterator->version); | 2861 proc_data->SetString("version", iterator->version); |
| 2861 proc_data->SetString("product_name", iterator->product_name); | 2862 proc_data->SetString("product_name", iterator->product_name); |
| 2862 proc_data->SetInteger("num_processes", iterator->num_processes); | 2863 proc_data->SetInteger("num_processes", iterator->num_processes); |
| 2863 proc_data->SetBoolean("is_diagnostics", iterator->is_diagnostics); | 2864 proc_data->SetBoolean("is_diagnostics", iterator->is_diagnostics); |
| 2864 | 2865 |
| 2865 // Process type, if this is a child process of Chrome (e.g., 'plugin'). | 2866 // Process type, if this is a child process of Chrome (e.g., 'plugin'). |
| 2866 std::string process_type = "Unknown"; | 2867 std::string process_type = "Unknown"; |
| 2867 // The following condition avoids a DCHECK in debug builds when the | 2868 // The following condition avoids a DCHECK in debug builds when the |
| 2868 // process type passed to |GetTypeNameInEnglish| is unknown. | 2869 // process type passed to |GetTypeNameInEnglish| is unknown. |
| 2869 if (iterator->type != ChildProcessInfo::UNKNOWN_PROCESS) | 2870 if (iterator->type != content::PROCESS_TYPE_UNKNOWN) |
| 2870 process_type = ChildProcessInfo::GetTypeNameInEnglish(iterator->type); | 2871 process_type = ChildProcessInfo::GetTypeNameInEnglish(iterator->type); |
| 2871 proc_data->SetString("child_process_type", process_type); | 2872 proc_data->SetString("child_process_type", process_type); |
| 2872 | 2873 |
| 2873 // Renderer type, if this is a renderer process. | 2874 // Renderer type, if this is a renderer process. |
| 2874 std::string renderer_type = "Unknown"; | 2875 std::string renderer_type = "Unknown"; |
| 2875 if (iterator->renderer_type != | 2876 if (iterator->renderer_type != |
| 2876 ProcessMemoryInformation::RENDERER_UNKNOWN) { | 2877 ProcessMemoryInformation::RENDERER_UNKNOWN) { |
| 2877 renderer_type = ProcessMemoryInformation::GetRendererTypeNameInEnglish( | 2878 renderer_type = ProcessMemoryInformation::GetRendererTypeNameInEnglish( |
| 2878 iterator->renderer_type); | 2879 iterator->renderer_type); |
| 2879 } | 2880 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2953 if (automation_) { | 2954 if (automation_) { |
| 2954 AutomationJSONReply(automation_, reply_message_.release()) | 2955 AutomationJSONReply(automation_, reply_message_.release()) |
| 2955 .SendSuccess(NULL); | 2956 .SendSuccess(NULL); |
| 2956 } | 2957 } |
| 2957 delete this; | 2958 delete this; |
| 2958 } | 2959 } |
| 2959 } else { | 2960 } else { |
| 2960 NOTREACHED(); | 2961 NOTREACHED(); |
| 2961 } | 2962 } |
| 2962 } | 2963 } |
| OLD | NEW |