| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // WebContentsObserver::DidNavigateMainFrame() occurs, so that we can update | 47 // WebContentsObserver::DidNavigateMainFrame() occurs, so that we can update |
| 48 // their Rappor sample name when a navigation takes place. | 48 // their Rappor sample name when a navigation takes place. |
| 49 virtual void UpdateRapporSampleName(); | 49 virtual void UpdateRapporSampleName(); |
| 50 | 50 |
| 51 // task_management::Task: | 51 // task_management::Task: |
| 52 void Activate() override; | 52 void Activate() override; |
| 53 void Refresh(const base::TimeDelta& update_interval, | 53 void Refresh(const base::TimeDelta& update_interval, |
| 54 int64_t refresh_flags) override; | 54 int64_t refresh_flags) override; |
| 55 Type GetType() const override; | 55 Type GetType() const override; |
| 56 int GetChildProcessUniqueID() const override; | 56 int GetChildProcessUniqueID() const override; |
| 57 void GetTerminationStatus(base::TerminationStatus* out_status, |
| 58 int* out_error_code) const override; |
| 57 base::string16 GetProfileName() const override; | 59 base::string16 GetProfileName() const override; |
| 60 int GetTabId() const override; |
| 58 int64_t GetV8MemoryAllocated() const override; | 61 int64_t GetV8MemoryAllocated() const override; |
| 59 int64_t GetV8MemoryUsed() const override; | 62 int64_t GetV8MemoryUsed() const override; |
| 60 bool ReportsWebCacheStats() const override; | 63 bool ReportsWebCacheStats() const override; |
| 61 blink::WebCache::ResourceTypeStats GetWebCacheStats() const override; | 64 blink::WebCache::ResourceTypeStats GetWebCacheStats() const override; |
| 62 | 65 |
| 63 // favicon::FaviconDriverObserver: | 66 // favicon::FaviconDriverObserver: |
| 64 void OnFaviconUpdated(favicon::FaviconDriver* driver, | 67 void OnFaviconUpdated(favicon::FaviconDriver* driver, |
| 65 NotificationIconType notification_icon_type, | 68 NotificationIconType notification_icon_type, |
| 66 const GURL& icon_url, | 69 const GURL& icon_url, |
| 67 bool icon_url_changed, | 70 bool icon_url_changed, |
| 68 const gfx::Image& image) override; | 71 const gfx::Image& image) override; |
| 69 | 72 |
| 73 void set_termination_status(base::TerminationStatus status) { |
| 74 termination_status_ = status; |
| 75 } |
| 76 |
| 77 void set_termination_error_code(int error_code) { |
| 78 termination_error_code_ = error_code; |
| 79 } |
| 80 |
| 70 protected: | 81 protected: |
| 71 // Returns the title of the given |web_contents|. | 82 // Returns the title of the given |web_contents|. |
| 72 static base::string16 GetTitleFromWebContents( | 83 static base::string16 GetTitleFromWebContents( |
| 73 content::WebContents* web_contents); | 84 content::WebContents* web_contents); |
| 74 | 85 |
| 75 // Returns the favicon of the given |web_contents| if any, and returns | 86 // Returns the favicon of the given |web_contents| if any, and returns |
| 76 // |nullptr| otherwise. | 87 // |nullptr| otherwise. |
| 77 static const gfx::ImageSkia* GetFaviconFromWebContents( | 88 static const gfx::ImageSkia* GetFaviconFromWebContents( |
| 78 content::WebContents* web_contents); | 89 content::WebContents* web_contents); |
| 79 | 90 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 107 int64_t v8_memory_allocated_; | 118 int64_t v8_memory_allocated_; |
| 108 int64_t v8_memory_used_; | 119 int64_t v8_memory_used_; |
| 109 | 120 |
| 110 // The WebKit resource cache statistics for this renderer. | 121 // The WebKit resource cache statistics for this renderer. |
| 111 blink::WebCache::ResourceTypeStats webcache_stats_; | 122 blink::WebCache::ResourceTypeStats webcache_stats_; |
| 112 | 123 |
| 113 // The profile name associated with the browser context of the render view | 124 // The profile name associated with the browser context of the render view |
| 114 // host. | 125 // host. |
| 115 const base::string16 profile_name_; | 126 const base::string16 profile_name_; |
| 116 | 127 |
| 128 base::TerminationStatus termination_status_; |
| 129 int termination_error_code_; |
| 130 |
| 117 DISALLOW_COPY_AND_ASSIGN(RendererTask); | 131 DISALLOW_COPY_AND_ASSIGN(RendererTask); |
| 118 }; | 132 }; |
| 119 | 133 |
| 120 } // namespace task_management | 134 } // namespace task_management |
| 121 | 135 |
| 122 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H
_ | 136 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H
_ |
| OLD | NEW |