| OLD | NEW |
| 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_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 virtual void CloseContents(TabContents* source) OVERRIDE; | 49 virtual void CloseContents(TabContents* source) OVERRIDE; |
| 50 virtual bool ShouldSuppressDialogs() OVERRIDE; | 50 virtual bool ShouldSuppressDialogs() OVERRIDE; |
| 51 virtual void DidNavigateMainFramePostCommit(TabContents* tab) OVERRIDE; | 51 virtual void DidNavigateMainFramePostCommit(TabContents* tab) OVERRIDE; |
| 52 | 52 |
| 53 // TabContentsObserver implementation: | 53 // TabContentsObserver implementation: |
| 54 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 54 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 55 | 55 |
| 56 // content::NotificationObserver | 56 // content::NotificationObserver |
| 57 virtual void Observe(int type, | 57 virtual void Observe(int type, |
| 58 const content::NotificationSource& source, | 58 const content::NotificationSource& source, |
| 59 const content::NotificationDetails& details); | 59 const content::NotificationDetails& details) OVERRIDE; |
| 60 | 60 |
| 61 protected: | 61 protected: |
| 62 // Exposed for testing. | 62 // Exposed for testing. |
| 63 BackgroundContents(); | 63 BackgroundContents(); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 // The delegate for this BackgroundContents. | 66 // The delegate for this BackgroundContents. |
| 67 Delegate* delegate_; | 67 Delegate* delegate_; |
| 68 | 68 |
| 69 Profile* profile_; | 69 Profile* profile_; |
| 70 scoped_ptr<TabContents> tab_contents_; | 70 scoped_ptr<TabContents> tab_contents_; |
| 71 content::NotificationRegistrar registrar_; | 71 content::NotificationRegistrar registrar_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(BackgroundContents); | 73 DISALLOW_COPY_AND_ASSIGN(BackgroundContents); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // This is the data sent out as the details with BACKGROUND_CONTENTS_OPENED. | 76 // This is the data sent out as the details with BACKGROUND_CONTENTS_OPENED. |
| 77 struct BackgroundContentsOpenedDetails { | 77 struct BackgroundContentsOpenedDetails { |
| 78 // The BackgroundContents object that has just been opened. | 78 // The BackgroundContents object that has just been opened. |
| 79 BackgroundContents* contents; | 79 BackgroundContents* contents; |
| 80 | 80 |
| 81 // The name of the parent frame for these contents. | 81 // The name of the parent frame for these contents. |
| 82 const string16& frame_name; | 82 const string16& frame_name; |
| 83 | 83 |
| 84 // The ID of the parent application (if any). | 84 // The ID of the parent application (if any). |
| 85 const string16& application_id; | 85 const string16& application_id; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 #endif // CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ | 88 #endif // CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ |
| OLD | NEW |