| 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> |
| 9 |
| 10 #include "base/macros.h" |
| 8 #include "chrome/browser/task_management/providers/task.h" | 11 #include "chrome/browser/task_management/providers/task.h" |
| 9 #include "components/favicon/core/favicon_driver_observer.h" | 12 #include "components/favicon/core/favicon_driver_observer.h" |
| 10 #include "content/public/browser/navigation_entry.h" | 13 #include "content/public/browser/navigation_entry.h" |
| 11 | 14 |
| 12 class ProcessResourceUsage; | 15 class ProcessResourceUsage; |
| 13 | 16 |
| 14 namespace content { | 17 namespace content { |
| 15 class RenderProcessHost; | 18 class RenderProcessHost; |
| 16 class WebContents; | 19 class WebContents; |
| 17 } // namespace content | 20 } // namespace content |
| (...skipping 23 matching lines...) Expand all Loading... |
| 41 virtual void UpdateFavicon() = 0; | 44 virtual void UpdateFavicon() = 0; |
| 42 | 45 |
| 43 // An overridable method that will be called when the event | 46 // An overridable method that will be called when the event |
| 44 // WebContentsObserver::DidNavigateMainFrame() occurs, so that we can update | 47 // WebContentsObserver::DidNavigateMainFrame() occurs, so that we can update |
| 45 // their Rappor sample name when a navigation takes place. | 48 // their Rappor sample name when a navigation takes place. |
| 46 virtual void UpdateRapporSampleName(); | 49 virtual void UpdateRapporSampleName(); |
| 47 | 50 |
| 48 // task_management::Task: | 51 // task_management::Task: |
| 49 void Activate() override; | 52 void Activate() override; |
| 50 void Refresh(const base::TimeDelta& update_interval, | 53 void Refresh(const base::TimeDelta& update_interval, |
| 51 int64 refresh_flags) override; | 54 int64_t refresh_flags) override; |
| 52 Type GetType() const override; | 55 Type GetType() const override; |
| 53 int GetChildProcessUniqueID() const override; | 56 int GetChildProcessUniqueID() const override; |
| 54 base::string16 GetProfileName() const override; | 57 base::string16 GetProfileName() const override; |
| 55 int64 GetV8MemoryAllocated() const override; | 58 int64_t GetV8MemoryAllocated() const override; |
| 56 int64 GetV8MemoryUsed() const override; | 59 int64_t GetV8MemoryUsed() const override; |
| 57 bool ReportsWebCacheStats() const override; | 60 bool ReportsWebCacheStats() const override; |
| 58 blink::WebCache::ResourceTypeStats GetWebCacheStats() const override; | 61 blink::WebCache::ResourceTypeStats GetWebCacheStats() const override; |
| 59 | 62 |
| 60 // favicon::FaviconDriverObserver: | 63 // favicon::FaviconDriverObserver: |
| 61 void OnFaviconUpdated(favicon::FaviconDriver* driver, | 64 void OnFaviconUpdated(favicon::FaviconDriver* driver, |
| 62 NotificationIconType notification_icon_type, | 65 NotificationIconType notification_icon_type, |
| 63 const GURL& icon_url, | 66 const GURL& icon_url, |
| 64 bool icon_url_changed, | 67 bool icon_url_changed, |
| 65 const gfx::Image& image) override; | 68 const gfx::Image& image) override; |
| 66 | 69 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 94 | 97 |
| 95 // The Mojo service wrapper that will provide us with the V8 memory usage and | 98 // The Mojo service wrapper that will provide us with the V8 memory usage and |
| 96 // the WebCache resource stats of the render process represented by this | 99 // the WebCache resource stats of the render process represented by this |
| 97 // object. | 100 // object. |
| 98 scoped_ptr<ProcessResourceUsage> renderer_resources_sampler_; | 101 scoped_ptr<ProcessResourceUsage> renderer_resources_sampler_; |
| 99 | 102 |
| 100 // The unique ID of the RenderProcessHost. | 103 // The unique ID of the RenderProcessHost. |
| 101 const int render_process_id_; | 104 const int render_process_id_; |
| 102 | 105 |
| 103 // The allocated and used V8 memory (in bytes). | 106 // The allocated and used V8 memory (in bytes). |
| 104 int64 v8_memory_allocated_; | 107 int64_t v8_memory_allocated_; |
| 105 int64 v8_memory_used_; | 108 int64_t v8_memory_used_; |
| 106 | 109 |
| 107 // The WebKit resource cache statistics for this renderer. | 110 // The WebKit resource cache statistics for this renderer. |
| 108 blink::WebCache::ResourceTypeStats webcache_stats_; | 111 blink::WebCache::ResourceTypeStats webcache_stats_; |
| 109 | 112 |
| 110 // The profile name associated with the browser context of the render view | 113 // The profile name associated with the browser context of the render view |
| 111 // host. | 114 // host. |
| 112 const base::string16 profile_name_; | 115 const base::string16 profile_name_; |
| 113 | 116 |
| 114 DISALLOW_COPY_AND_ASSIGN(RendererTask); | 117 DISALLOW_COPY_AND_ASSIGN(RendererTask); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 } // namespace task_management | 120 } // namespace task_management |
| 118 | 121 |
| 119 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H
_ | 122 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H
_ |
| OLD | NEW |