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

Side by Side Diff: chrome/browser/ui/webui/workers_ui.cc

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.h ('k') | chrome/renderer/chrome_ppb_pdf_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/workers_ui.h" 5 #include "chrome/browser/ui/webui/workers_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 WorkerService::GetInstance()->AddObserver(this); 246 WorkerService::GetInstance()->AddObserver(this);
247 } 247 }
248 void UnregisterObserver() { 248 void UnregisterObserver() {
249 WorkerService::GetInstance()->RemoveObserver(this); 249 WorkerService::GetInstance()->RemoveObserver(this);
250 } 250 }
251 251
252 WorkersUI* workers_ui_; 252 WorkersUI* workers_ui_;
253 }; 253 };
254 254
255 WorkersUI::WorkersUI(WebContents* contents) 255 WorkersUI::WorkersUI(WebContents* contents)
256 : WebUI(contents), 256 : WebUI(contents, this),
257 observer_(new WorkerCreationDestructionListener(this)){ 257 observer_(new WorkerCreationDestructionListener(this)){
258 AddMessageHandler(new WorkersDOMHandler()); 258 AddMessageHandler(new WorkersDOMHandler());
259 259
260 WorkersUIHTMLSource* html_source = new WorkersUIHTMLSource(); 260 WorkersUIHTMLSource* html_source = new WorkersUIHTMLSource();
261 261
262 // Set up the chrome://workers/ source. 262 // Set up the chrome://workers/ source.
263 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 263 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
264 profile->GetChromeURLDataManager()->AddDataSource(html_source); 264 profile->GetChromeURLDataManager()->AddDataSource(html_source);
265 } 265 }
266 266
267 WorkersUI::~WorkersUI() { 267 WorkersUI::~WorkersUI() {
268 observer_->WorkersUIDestroyed(); 268 observer_->WorkersUIDestroyed();
269 observer_ = NULL; 269 observer_ = NULL;
270 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.h ('k') | chrome/renderer/chrome_ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698