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

Side by Side Diff: chrome/browser/background/background_contents.h

Issue 793403003: Move BackgroundContents to the directory in which it belongs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pageidcrash
Patch Set: rebase Created 6 years 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
« no previous file with comments | « no previous file | chrome/browser/background/background_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BACKGROUND_BACKGROUND_CONTENTS_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
13 #include "content/public/browser/web_contents_delegate.h" 13 #include "content/public/browser/web_contents_delegate.h"
14 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
15 #include "ui/base/window_open_disposition.h" 15 #include "ui/base/window_open_disposition.h"
16 16
17 class Profile; 17 class Profile;
18 18
19 namespace content { 19 namespace content {
20 class SessionStorageNamespace; 20 class SessionStorageNamespace;
21 class SiteInstance; 21 class SiteInstance;
22 }; 22 };
23 23
24 // This class consumes WebContents. It can host a renderer, but does not 24 // This class maintains a WebContents used in the background. It can host a
25 // have any visible display. 25 // renderer, but does not have any visible display.
26 // TODO(atwilson): Unify this with background pages; http://crbug.com/77790
26 class BackgroundContents : public content::WebContentsDelegate, 27 class BackgroundContents : public content::WebContentsDelegate,
27 public content::WebContentsObserver, 28 public content::WebContentsObserver,
28 public content::NotificationObserver { 29 public content::NotificationObserver {
29 public: 30 public:
30 class Delegate { 31 class Delegate {
31 public: 32 public:
32 // Called by AddNewContents(). Asks the delegate to attach the opened 33 // 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 34 // WebContents to a suitable container (e.g. browser) or to show it if it's
34 // a popup window. If |was_blocked| is non-NULL, then |*was_blocked| will be 35 // a popup window. If |was_blocked| is non-NULL, then |*was_blocked| will be
35 // set to true if the popup gets blocked, and left unchanged otherwise. 36 // set to true if the popup gets blocked, and left unchanged otherwise.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // The BackgroundContents object that has just been opened. 96 // The BackgroundContents object that has just been opened.
96 BackgroundContents* contents; 97 BackgroundContents* contents;
97 98
98 // The name of the parent frame for these contents. 99 // The name of the parent frame for these contents.
99 const base::string16& frame_name; 100 const base::string16& frame_name;
100 101
101 // The ID of the parent application (if any). 102 // The ID of the parent application (if any).
102 const base::string16& application_id; 103 const base::string16& application_id;
103 }; 104 };
104 105
105 #endif // CHROME_BROWSER_TAB_CONTENTS_BACKGROUND_CONTENTS_H_ 106 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698