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

Unified Diff: chrome/browser/user_style_sheet_watcher.h

Issue 64843004: Get rid of user-level styles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to ToT Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/user_style_sheet_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/user_style_sheet_watcher.h
diff --git a/chrome/browser/user_style_sheet_watcher.h b/chrome/browser/user_style_sheet_watcher.h
deleted file mode 100644
index a8bf140edec69c00f9c5c0cc5f7c653711165f17..0000000000000000000000000000000000000000
--- a/chrome/browser/user_style_sheet_watcher.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_USER_STYLE_SHEET_WATCHER_H_
-#define CHROME_BROWSER_USER_STYLE_SHEET_WATCHER_H_
-
-#include "base/callback_list.h"
-#include "base/files/file_path.h"
-#include "base/files/file_path_watcher.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/sequenced_task_runner_helpers.h"
-#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "url/gurl.h"
-
-class Profile;
-class UserStyleSheetLoader;
-
-// Watches the user style sheet file and triggers reloads on the file thread
-// whenever the file changes.
-class UserStyleSheetWatcher
- : public content::NotificationObserver,
- public RefcountedBrowserContextKeyedService {
- public:
- UserStyleSheetWatcher(Profile* profile, const base::FilePath& profile_path);
-
- void Init();
-
- GURL user_style_sheet() const;
-
- // Register a callback to be called whenever the stylesheet gets updated.
- scoped_ptr<base::CallbackList<void(void)>::Subscription>
- RegisterOnStyleSheetUpdatedCallback(const base::Closure& callback);
-
- // content::NotificationObserver interface
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- // RefCountedProfileKeyedBase method override.
- virtual void ShutdownOnUIThread() OVERRIDE;
-
- private:
- friend class base::DeleteHelper<UserStyleSheetWatcher>;
-
- virtual ~UserStyleSheetWatcher();
-
- // The profile owning us.
- Profile* profile_;
-
- // The directory containing User StyleSheets/Custom.css.
- base::FilePath profile_path_;
-
- // The loader object.
- scoped_refptr<UserStyleSheetLoader> loader_;
-
- // Watches for changes to the css file so we can reload the style sheet.
- scoped_ptr<base::FilePathWatcher> file_watcher_;
-
- content::NotificationRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(UserStyleSheetWatcher);
-};
-
-#endif // CHROME_BROWSER_USER_STYLE_SHEET_WATCHER_H_
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/user_style_sheet_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698