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/ui/webui/crashes_ui.h" | 5 #include "chrome/browser/ui/webui/crashes_ui.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 //////////////////////////////////////////////////////////////////////////////// | 68 //////////////////////////////////////////////////////////////////////////////// |
69 | 69 |
70 // The handler for Javascript messages for the chrome://crashes/ page. | 70 // The handler for Javascript messages for the chrome://crashes/ page. |
71 class CrashesDOMHandler : public WebUIMessageHandler, | 71 class CrashesDOMHandler : public WebUIMessageHandler, |
72 public CrashUploadList::Delegate { | 72 public CrashUploadList::Delegate { |
73 public: | 73 public: |
74 CrashesDOMHandler(); | 74 CrashesDOMHandler(); |
75 virtual ~CrashesDOMHandler(); | 75 virtual ~CrashesDOMHandler(); |
76 | 76 |
77 // WebUIMessageHandler implementation. | 77 // WebUIMessageHandler implementation. |
78 virtual void RegisterMessages() OVERRIDE; | 78 virtual void RegisterMessages() override; |
79 | 79 |
80 // CrashUploadList::Delegate implemenation. | 80 // CrashUploadList::Delegate implemenation. |
81 virtual void OnUploadListAvailable() OVERRIDE; | 81 virtual void OnUploadListAvailable() override; |
82 | 82 |
83 private: | 83 private: |
84 // Asynchronously fetches the list of crashes. Called from JS. | 84 // Asynchronously fetches the list of crashes. Called from JS. |
85 void HandleRequestCrashes(const base::ListValue* args); | 85 void HandleRequestCrashes(const base::ListValue* args); |
86 | 86 |
87 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
88 // Asynchronously triggers crash uploading. Called from JS. | 88 // Asynchronously triggers crash uploading. Called from JS. |
89 void HandleRequestUploads(const base::ListValue* args); | 89 void HandleRequestUploads(const base::ListValue* args); |
90 #endif | 90 #endif |
91 | 91 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 Profile* profile = Profile::FromWebUI(web_ui); | 198 Profile* profile = Profile::FromWebUI(web_ui); |
199 content::WebUIDataSource::Add(profile, CreateCrashesUIHTMLSource()); | 199 content::WebUIDataSource::Add(profile, CreateCrashesUIHTMLSource()); |
200 } | 200 } |
201 | 201 |
202 // static | 202 // static |
203 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes( | 203 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes( |
204 ui::ScaleFactor scale_factor) { | 204 ui::ScaleFactor scale_factor) { |
205 return ResourceBundle::GetSharedInstance(). | 205 return ResourceBundle::GetSharedInstance(). |
206 LoadDataResourceBytesForScale(IDR_SAD_FAVICON, scale_factor); | 206 LoadDataResourceBytesForScale(IDR_SAD_FAVICON, scale_factor); |
207 } | 207 } |
OLD | NEW |