| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/task_manager/tab_contents_information.h" | 5 #include "chrome/browser/task_manager/tab_contents_information.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/devtools/devtools_window.h" | 10 #include "chrome/browser/devtools/devtools_window.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return prerender_manager && | 46 return prerender_manager && |
| 47 prerender_manager->IsWebContentsPrerendering(web_contents, NULL); | 47 prerender_manager->IsWebContentsPrerendering(web_contents, NULL); |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace | 50 } // namespace |
| 51 | 51 |
| 52 // Tracks a single tab contents, prerendered page, or Instant page. | 52 // Tracks a single tab contents, prerendered page, or Instant page. |
| 53 class TabContentsResource : public RendererResource { | 53 class TabContentsResource : public RendererResource { |
| 54 public: | 54 public: |
| 55 explicit TabContentsResource(content::WebContents* web_contents); | 55 explicit TabContentsResource(content::WebContents* web_contents); |
| 56 virtual ~TabContentsResource(); | 56 ~TabContentsResource() override; |
| 57 | 57 |
| 58 // Resource methods: | 58 // Resource methods: |
| 59 virtual Type GetType() const override; | 59 Type GetType() const override; |
| 60 virtual base::string16 GetTitle() const override; | 60 base::string16 GetTitle() const override; |
| 61 virtual gfx::ImageSkia GetIcon() const override; | 61 gfx::ImageSkia GetIcon() const override; |
| 62 virtual content::WebContents* GetWebContents() const override; | 62 content::WebContents* GetWebContents() const override; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // Returns true if contains content rendered by an extension. | 65 // Returns true if contains content rendered by an extension. |
| 66 bool HostsExtension() const; | 66 bool HostsExtension() const; |
| 67 | 67 |
| 68 static gfx::ImageSkia* prerender_icon_; | 68 static gfx::ImageSkia* prerender_icon_; |
| 69 content::WebContents* web_contents_; | 69 content::WebContents* web_contents_; |
| 70 Profile* profile_; | 70 Profile* profile_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(TabContentsResource); | 72 DISALLOW_COPY_AND_ASSIGN(TabContentsResource); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 scoped_ptr<RendererResource> TabContentsInformation::MakeResource( | 172 scoped_ptr<RendererResource> TabContentsInformation::MakeResource( |
| 173 content::WebContents* web_contents) { | 173 content::WebContents* web_contents) { |
| 174 return scoped_ptr<RendererResource>(new TabContentsResource(web_contents)); | 174 return scoped_ptr<RendererResource>(new TabContentsResource(web_contents)); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace task_manager | 177 } // namespace task_manager |
| OLD | NEW |