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

Side by Side Diff: blimp/client/core/contents/blimp_contents_manager.h

Issue 2201433002: Migrate TabControlFeature from 0.5 to 0.6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove BlmipContentImpl default constructor, Move BlimpContentsDeletionObserver declaration to blim… Created 4 years, 4 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 2016 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 BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_
6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_
7
8 #include "blimp/client/core/contents/blimp_contents_impl.h"
9 #include "blimp/client/public/contents/blimp_contents_observer.h"
10
11 namespace blimp {
12 namespace client {
13
14 class BlimpContentsManager {
15 public:
16 BlimpContentsManager();
17 ~BlimpContentsManager();
18
19 std::unique_ptr<BlimpContentsImpl> CreateBlimpContents();
20 BlimpContentsImpl* GetBlimpContents(int id);
21
22 private:
23 class BlimpContentsDeletionObserver : public BlimpContentsObserver {
David Trainor- moved to gerrit 2016/08/04 16:21:18 Leave this in the cc file and surround it with ano
Menglin 2016/08/05 02:08:24 BlimpContentsDeletionObserver doesn't work with an
David Trainor- moved to gerrit 2016/08/05 16:10:23 Sorry I suggested that before I wrote my other com
Menglin 2016/08/05 16:39:01 Done.
24 public:
25 BlimpContentsDeletionObserver(BlimpContentsManager* blimp_contents_manager,
26 BlimpContentsImpl* blimp_contents);
27 ~BlimpContentsDeletionObserver() override;
28
29 void OnContentsDestroyed() override;
30
31 BlimpContentsImpl* blimp_contents() { return contents_; }
32
33 private:
34 // The BlimpContentsManager containing this BlimpContentsDeletionObserver
35 BlimpContentsManager* blimp_contents_manager_;
36
37 // The BlimpContents being tracked by this BlimpContentsDeletionObserver.
38 BlimpContentsImpl* contents_;
39
40 DISALLOW_COPY_AND_ASSIGN(BlimpContentsDeletionObserver);
41 };
42
43 int CreateBlimpContentsId();
44 void EraseObserverFromMap(int id);
45
46 std::map<int, std::unique_ptr<BlimpContentsDeletionObserver>> observer_map_;
47
48 DISALLOW_COPY_AND_ASSIGN(BlimpContentsManager);
49 };
50
51 } // namespace client
52 } // namespace blimp
53
54 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_
OLDNEW
« no previous file with comments | « blimp/client/core/contents/blimp_contents_impl_unittest.cc ('k') | blimp/client/core/contents/blimp_contents_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698