| 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 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
| 13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
| 14 #include "content/public/browser/web_contents_delegate.h" | 14 #include "content/public/browser/web_contents_delegate.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "webkit/glue/window_open_disposition.h" | 16 #include "webkit/glue/window_open_disposition.h" |
| 17 | 17 |
| 18 class Profile; | 18 class Profile; |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class SiteInstance; | 21 class SiteInstance; |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 // This class consumes TabContents. It can host a renderer, but does not | 24 // This class consumes WebContents. It can host a renderer, but does not |
| 25 // have any visible display. | 25 // have any visible display. |
| 26 class BackgroundContents : public content::WebContentsDelegate, | 26 class BackgroundContents : public content::WebContentsDelegate, |
| 27 public content::WebContentsObserver, | 27 public content::WebContentsObserver, |
| 28 public content::NotificationObserver { | 28 public content::NotificationObserver { |
| 29 public: | 29 public: |
| 30 class Delegate { | 30 class Delegate { |
| 31 public: | 31 public: |
| 32 // Called by AddNewContents(). Asks the delegate to attach the opened | 32 // Called by AddNewContents(). Asks the delegate to attach the opened |
| 33 // WebContents to a suitable container (e.g. browser) or to show it if it's | 33 // WebContents to a suitable container (e.g. browser) or to show it if it's |
| 34 // a popup window. | 34 // a popup window. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 BackgroundContents* contents; | 89 BackgroundContents* contents; |
| 90 | 90 |
| 91 // The name of the parent frame for these contents. | 91 // The name of the parent frame for these contents. |
| 92 const string16& frame_name; | 92 const string16& frame_name; |
| 93 | 93 |
| 94 // The ID of the parent application (if any). | 94 // The ID of the parent application (if any). |
| 95 const string16& application_id; | 95 const string16& application_id; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 #endif // CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ | 98 #endif // CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ |
| OLD | NEW |