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

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

Issue 2710823003: NOCOMMIT prototype: GRC service plumbing and process priority
Patch Set: Buildfixes Created 3 years, 9 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RESOURCE_COORDINATOR_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_BROWSER_RESOURCE_COORDINATOR_WEB_CONTENTS_OBSERVER_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "content/common/content_export.h"
12 #include "content/public/browser/web_contents_observer.h"
13 #include "content/public/browser/web_contents_user_data.h"
14 #include "services/resource_coordinator/public/cpp/resource_coordinator_interfac e.h"
15
16 namespace content {
17
18 class CONTENT_EXPORT ResourceCoordinatorWebContentsObserver
19 : public content::WebContentsObserver,
20 public content::WebContentsUserData<
21 ResourceCoordinatorWebContentsObserver> {
22 public:
23 ~ResourceCoordinatorWebContentsObserver() override;
24
25 // WebContentsObserver implementation.
26 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
27 void DidFinishNavigation(NavigationHandle* navigation_handle) override;
28 void WasShown() override;
29 void WasHidden() override;
30
31 resource_coordinator::ResourceCoordinatorInterface*
32 resource_coordinator_interface() {
33 return resource_coordinator_.get();
34 }
35
36 private:
37 explicit ResourceCoordinatorWebContentsObserver(
38 content::WebContents* web_contents);
39 friend class content::WebContentsUserData<
40 ResourceCoordinatorWebContentsObserver>;
41
42 std::unique_ptr<resource_coordinator::ResourceCoordinatorInterface>
43 resource_coordinator_;
44
45 DISALLOW_COPY_AND_ASSIGN(ResourceCoordinatorWebContentsObserver);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_RESOURCE_COORDINATOR_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698