Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: chrome/browser/ui/webui/chromeos/slow_ui.cc

Issue 22654003: Create system tray item for accessing chrome://slow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/slow_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/slow_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // content::URLDataSource implementation. 47 // content::URLDataSource implementation.
48 virtual std::string GetSource() const OVERRIDE; 48 virtual std::string GetSource() const OVERRIDE;
49 virtual void StartDataRequest( 49 virtual void StartDataRequest(
50 const std::string& path, 50 const std::string& path,
51 int render_process_id, 51 int render_process_id,
52 int render_view_id, 52 int render_view_id,
53 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 53 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
54 virtual std::string GetMimeType(const std::string&) const OVERRIDE { 54 virtual std::string GetMimeType(const std::string&) const OVERRIDE {
55 return "text/html"; 55 return "text/html";
56 } 56 }
57 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE {
58 return false;
59 }
60 57
61 private: 58 private:
62 virtual ~SlowUIHTMLSource() {} 59 virtual ~SlowUIHTMLSource() {}
63 60
64 DISALLOW_COPY_AND_ASSIGN(SlowUIHTMLSource); 61 DISALLOW_COPY_AND_ASSIGN(SlowUIHTMLSource);
65 }; 62 };
66 63
67 // The handler for Javascript messages related to the "slow" view. 64 // The handler for Javascript messages related to the "slow" view.
68 class SlowHandler : public WebUIMessageHandler { 65 class SlowHandler : public WebUIMessageHandler {
69 public: 66 public:
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 SlowHandler* handler = new SlowHandler(profile); 168 SlowHandler* handler = new SlowHandler(profile);
172 web_ui->AddMessageHandler(handler); 169 web_ui->AddMessageHandler(handler);
173 SlowUIHTMLSource* html_source = new SlowUIHTMLSource(); 170 SlowUIHTMLSource* html_source = new SlowUIHTMLSource();
174 171
175 // Set up the chrome://slow/ source. 172 // Set up the chrome://slow/ source.
176 content::URLDataSource::Add(profile, html_source); 173 content::URLDataSource::Add(profile, html_source);
177 } 174 }
178 175
179 } // namespace chromeos 176 } // namespace chromeos
180 177
OLDNEW
« ash/system/tray/system_tray.cc ('K') | « chrome/browser/ui/webui/chromeos/slow_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698