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

Side by Side Diff: chrome/browser/notifications/notification_exceptions_table_model.h

Issue 6044007: Remove wstring from TableModel.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 12 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
viettrungluu 2010/12/29 23:41:17 I don't think it's needed. (I don't think you nee
Avi (use Gerrit) 2010/12/30 00:04:15 Done.
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h"
12 #include "chrome/browser/notifications/desktop_notification_service.h" 13 #include "chrome/browser/notifications/desktop_notification_service.h"
13 #include "chrome/browser/remove_rows_table_model.h" 14 #include "chrome/browser/remove_rows_table_model.h"
14 #include "chrome/common/notification_observer.h" 15 #include "chrome/common/notification_observer.h"
15 16
16 class NotificationExceptionsTableModel : public RemoveRowsTableModel, 17 class NotificationExceptionsTableModel : public RemoveRowsTableModel,
17 public NotificationObserver { 18 public NotificationObserver {
18 public: 19 public:
19 explicit NotificationExceptionsTableModel( 20 explicit NotificationExceptionsTableModel(
20 DesktopNotificationService* service); 21 DesktopNotificationService* service);
21 virtual ~NotificationExceptionsTableModel(); 22 virtual ~NotificationExceptionsTableModel();
22 23
23 // Overridden from RemoveRowsTableModel: 24 // Overridden from RemoveRowsTableModel:
24 virtual bool CanRemoveRows(const Rows& rows) const; 25 virtual bool CanRemoveRows(const Rows& rows) const;
25 virtual void RemoveRows(const Rows& rows); 26 virtual void RemoveRows(const Rows& rows);
26 virtual void RemoveAll(); 27 virtual void RemoveAll();
27 28
28 // Overridden from TableModel: 29 // Overridden from TableModel:
29 virtual int RowCount(); 30 virtual int RowCount() OVERRIDE;
30 virtual std::wstring GetText(int row, int column_id); 31 virtual string16 GetText(int row, int column_id) OVERRIDE;
31 virtual void SetObserver(TableModelObserver* observer); 32 virtual void SetObserver(TableModelObserver* observer) OVERRIDE;
32 33
33 // Overridden from NotificationObserver: 34 // Overridden from NotificationObserver:
34 virtual void Observe(NotificationType type, 35 virtual void Observe(NotificationType type,
35 const NotificationSource& source, 36 const NotificationSource& source,
36 const NotificationDetails& details); 37 const NotificationDetails& details);
37 private: 38 private:
38 struct Entry; 39 struct Entry;
39 40
40 void LoadEntries(); 41 void LoadEntries();
41 42
42 DesktopNotificationService* service_; 43 DesktopNotificationService* service_;
43 44
44 typedef std::vector<Entry> EntriesVector; 45 typedef std::vector<Entry> EntriesVector;
45 EntriesVector entries_; 46 EntriesVector entries_;
46 47
47 // We use this variable to prevent ourselves from handling further changes 48 // We use this variable to prevent ourselves from handling further changes
48 // that we ourselves caused. 49 // that we ourselves caused.
49 bool updates_disabled_; 50 bool updates_disabled_;
50 NotificationRegistrar registrar_; 51 NotificationRegistrar registrar_;
51 TableModelObserver* observer_; 52 TableModelObserver* observer_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(NotificationExceptionsTableModel); 54 DISALLOW_COPY_AND_ASSIGN(NotificationExceptionsTableModel);
54 }; 55 };
55 56
56 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ 57 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698