| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_CHROME_NOTIFICATION_TYPES_H_ | 5 #ifndef CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ |
| 6 #define CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ | 6 #define CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 |
| 10 #if defined(ENABLE_EXTENSIONS) |
| 9 #include "extensions/browser/notification_types.h" | 11 #include "extensions/browser/notification_types.h" |
| 12 #else |
| 13 #include "content/public/browser/notification_types.h" |
| 14 #endif |
| 15 |
| 16 #if defined(ENABLE_EXTENSIONS) |
| 17 #define PREVIOUS_END extensions::NOTIFICATION_EXTENSIONS_END |
| 18 #else |
| 19 #define PREVIOUS_END content::NOTIFICATION_CONTENT_END |
| 20 #endif |
| 10 | 21 |
| 11 namespace chrome { | 22 namespace chrome { |
| 12 | 23 |
| 13 enum NotificationType { | 24 enum NotificationType { |
| 14 NOTIFICATION_CHROME_START = extensions::NOTIFICATION_EXTENSIONS_END, | 25 NOTIFICATION_CHROME_START = PREVIOUS_END, |
| 15 | 26 |
| 16 // Browser-window ---------------------------------------------------------- | 27 // Browser-window ---------------------------------------------------------- |
| 17 | 28 |
| 18 // This message is sent after a window has been opened. The source is a | 29 // This message is sent after a window has been opened. The source is a |
| 19 // Source<Browser> containing the affected Browser. No details are | 30 // Source<Browser> containing the affected Browser. No details are |
| 20 // expected. | 31 // expected. |
| 21 NOTIFICATION_BROWSER_OPENED = NOTIFICATION_CHROME_START, | 32 NOTIFICATION_BROWSER_OPENED = NOTIFICATION_CHROME_START, |
| 22 | 33 |
| 23 // This message is sent soon after BROWSER_OPENED, and indicates that | 34 // This message is sent soon after BROWSER_OPENED, and indicates that |
| 24 // the Browser's |window_| is now non-NULL. The source is a Source<Browser> | 35 // the Browser's |window_| is now non-NULL. The source is a Source<Browser> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // the InfoBarService the InfoBar was removed from. The details is a | 141 // the InfoBarService the InfoBar was removed from. The details is a |
| 131 // Details<InfoBar::RemovedDetails>. | 142 // Details<InfoBar::RemovedDetails>. |
| 132 NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 143 NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
| 133 | 144 |
| 134 // Used to fire notifications about how long various events took to | 145 // Used to fire notifications about how long various events took to |
| 135 // complete. E.g., this is used to get more fine grained timings from the | 146 // complete. E.g., this is used to get more fine grained timings from the |
| 136 // new tab page. The source is a WebContents and the details is a | 147 // new tab page. The source is a WebContents and the details is a |
| 137 // MetricEventDurationDetails. | 148 // MetricEventDurationDetails. |
| 138 NOTIFICATION_METRIC_EVENT_DURATION, | 149 NOTIFICATION_METRIC_EVENT_DURATION, |
| 139 | 150 |
| 151 #if defined(ENABLE_EXTENSIONS) |
| 140 // This notification is sent when extensions::TabHelper::SetExtensionApp is | 152 // This notification is sent when extensions::TabHelper::SetExtensionApp is |
| 141 // invoked. The source is the extensions::TabHelper SetExtensionApp was | 153 // invoked. The source is the extensions::TabHelper SetExtensionApp was |
| 142 // invoked on. | 154 // invoked on. |
| 143 NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, | 155 NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED, |
| 156 #endif |
| 144 | 157 |
| 145 // Tabs -------------------------------------------------------------------- | 158 // Tabs -------------------------------------------------------------------- |
| 146 | 159 |
| 147 // Sent when a tab is added to a WebContentsDelegate. The source is the | 160 // Sent when a tab is added to a WebContentsDelegate. The source is the |
| 148 // WebContentsDelegate and the details is the added WebContents. | 161 // WebContentsDelegate and the details is the added WebContents. |
| 149 NOTIFICATION_TAB_ADDED, | 162 NOTIFICATION_TAB_ADDED, |
| 150 | 163 |
| 151 // This notification is sent after a tab has been appended to the tab_strip. | 164 // This notification is sent after a tab has been appended to the tab_strip. |
| 152 // The source is a Source<WebContents> of the tab being added. There | 165 // The source is a Source<WebContents> of the tab being added. There |
| 153 // are no details. | 166 // are no details. |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 // Note:- | 695 // Note:- |
| 683 // Currently only Content and Chrome define and use notifications. | 696 // Currently only Content and Chrome define and use notifications. |
| 684 // Custom notifications not belonging to Content and Chrome should start | 697 // Custom notifications not belonging to Content and Chrome should start |
| 685 // from here. | 698 // from here. |
| 686 NOTIFICATION_CHROME_END, | 699 NOTIFICATION_CHROME_END, |
| 687 }; | 700 }; |
| 688 | 701 |
| 689 } // namespace chrome | 702 } // namespace chrome |
| 690 | 703 |
| 691 #endif // CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ | 704 #endif // CHROME_BROWSER_CHROME_NOTIFICATION_TYPES_H_ |
| OLD | NEW |