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

Side by Side Diff: content/browser/site_instance_impl.h

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed Nasko's nits Created 4 years, 10 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_
6 #define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ 6 #define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "content/browser/renderer_host/render_process_host_impl.h" 13 #include "content/browser/renderer_host/render_process_host_impl.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/browser/render_process_host_observer.h" 15 #include "content/public/browser/render_process_host_observer.h"
16 #include "content/public/browser/site_instance.h" 16 #include "content/public/browser/site_instance.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace content { 19 namespace content {
20 class BrowsingInstance; 20 class BrowsingInstance;
21 class RenderProcessHostFactory; 21 class RenderProcessHostFactory;
22 22
23 class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance, 23 class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
24 public RenderProcessHostObserver { 24 public RenderProcessHostObserver {
25 public: 25 public:
26 class Observer { 26 class CONTENT_EXPORT Observer {
27 public: 27 public:
28 // Called when this SiteInstance transitions to having no active frames, 28 // Called when this SiteInstance transitions to having no active frames,
29 // as measured by active_frame_count(). 29 // as measured by active_frame_count().
30 virtual void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) = 0; 30 virtual void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) {}
31 31
32 // Called when the renderer process of this SiteInstance has exited. 32 // Called when the renderer process of this SiteInstance has exited.
33 virtual void RenderProcessGone(SiteInstanceImpl* site_instance) = 0; 33 virtual void RenderProcessGone(SiteInstanceImpl* site_instance) = 0;
34 }; 34 };
35 35
36 // SiteInstance interface overrides. 36 // SiteInstance interface overrides.
37 int32_t GetId() override; 37 int32_t GetId() override;
38 bool HasProcess() const override; 38 bool HasProcess() const override;
39 RenderProcessHost* GetProcess() override; 39 RenderProcessHost* GetProcess() override;
40 BrowserContext* GetBrowserContext() const override; 40 BrowserContext* GetBrowserContext() const override;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool has_site_; 164 bool has_site_;
165 165
166 base::ObserverList<Observer, true> observers_; 166 base::ObserverList<Observer, true> observers_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); 168 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl);
169 }; 169 };
170 170
171 } // namespace content 171 } // namespace content
172 172
173 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ 173 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698