Chromium Code Reviews| Index: chrome/browser/printing/print_preview_tab_controller.h |
| diff --git a/chrome/browser/printing/print_preview_tab_controller.h b/chrome/browser/printing/print_preview_tab_controller.h |
| index 6bfc8dcf69408654b69ae1809762ad5a79e21272..8236032d8e20885d55d20334aca1d850754593db 100644 |
| --- a/chrome/browser/printing/print_preview_tab_controller.h |
| +++ b/chrome/browser/printing/print_preview_tab_controller.h |
| @@ -21,8 +21,13 @@ |
| #include "content/common/notification_registrar.h" |
| class Browser; |
| +class RenderProcessHost; |
| class TabContents; |
| +namespace content { |
| +struct LoadCommittedDetails; |
| +} |
| + |
| namespace printing { |
| class PrintPreviewTabController |
| @@ -52,7 +57,7 @@ class PrintPreviewTabController |
| // Returns NULL if no initiator tab exists for |preview_tab|. |
| TabContents* GetInitiatorTab(TabContents* preview_tab); |
| - // Notification observer implementation. |
| + // NotificationObserver implementation. |
| virtual void Observe(int type, |
| const NotificationSource& source, |
| const NotificationDetails& details); |
| @@ -66,6 +71,19 @@ class PrintPreviewTabController |
| private: |
| friend class base::RefCounted<PrintPreviewTabController>; |
| + // Handler for the RENDERER_PROCESS_CLOSED notification. This is observed when |
| + // the initiator renderer crashed. |
| + void OnRendererProcessClosed(RenderProcessHost* rph); |
| + |
| + // Handler for the TAB_CONTENTS_DESTROYED notification. This is observed when |
| + // either tab is closed. |
| + void OnTabContentsDestroyed(TabContents* tab); |
| + |
| + // Handler for the NAV_ENTRY_COMMITTED notification. This is observed when the |
| + // renderer is navigated to a different page. |
| + void OnNavEntryCommitted(TabContents* tab, |
| + content::LoadCommittedDetails* details); |
| + |
| // 1:1 relationship between initiator tab and print preview tab. |
| // Key: Preview tab. |
| // Value: Initiator tab. |
| @@ -78,6 +96,7 @@ class PrintPreviewTabController |
| void AddObservers(TabContents* tab); |
| void RemoveObservers(TabContents* tab); |
| + // Mapping between initiator tab and the corresponding print preview tab. |
|
Lei Zhang
2011/08/09 20:51:19
When I read this comment, I thought the key was th
kmadhusu
2011/08/10 16:46:59
As per chromium style guide, I cannot move typedef
|
| PrintPreviewTabMap preview_tab_map_; |
| // A registrar for listening notifications. |