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

Side by Side Diff: chrome/browser/extensions/extension_function.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <list> 10 #include <list>
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Helper class to track the lifetime of ExtensionFunction's RenderViewHost 256 // Helper class to track the lifetime of ExtensionFunction's RenderViewHost
257 // pointer and NULL it out when it dies. We use this separate class (instead 257 // pointer and NULL it out when it dies. We use this separate class (instead
258 // of implementing NotificationObserver on ExtensionFunction) because it is 258 // of implementing NotificationObserver on ExtensionFunction) because it is
259 // common for subclasses of ExtensionFunction to be NotificationObservers, and 259 // common for subclasses of ExtensionFunction to be NotificationObservers, and
260 // it would be an easy error to forget to call the base class's Observe() 260 // it would be an easy error to forget to call the base class's Observe()
261 // method. 261 // method.
262 class RenderViewHostTracker : public NotificationObserver { 262 class RenderViewHostTracker : public NotificationObserver {
263 public: 263 public:
264 explicit RenderViewHostTracker(UIThreadExtensionFunction* function); 264 explicit RenderViewHostTracker(UIThreadExtensionFunction* function);
265 private: 265 private:
266 virtual void Observe(NotificationType type, 266 virtual void Observe(int type,
267 const NotificationSource& source, 267 const NotificationSource& source,
268 const NotificationDetails& details); 268 const NotificationDetails& details);
269 UIThreadExtensionFunction* function_; 269 UIThreadExtensionFunction* function_;
270 NotificationRegistrar registrar_; 270 NotificationRegistrar registrar_;
271 }; 271 };
272 272
273 virtual void Destruct() const; 273 virtual void Destruct() const;
274 274
275 scoped_ptr<RenderViewHostTracker> tracker_; 275 scoped_ptr<RenderViewHostTracker> tracker_;
276 }; 276 };
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 public: 349 public:
350 SyncIOThreadExtensionFunction(); 350 SyncIOThreadExtensionFunction();
351 351
352 virtual void Run() OVERRIDE; 352 virtual void Run() OVERRIDE;
353 353
354 protected: 354 protected:
355 virtual ~SyncIOThreadExtensionFunction(); 355 virtual ~SyncIOThreadExtensionFunction();
356 }; 356 };
357 357
358 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ 358 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_event_router.cc ('k') | chrome/browser/extensions/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698