Chromium Code Reviews| Index: blimp/client/core/contents/blimp_contents_manager.h |
| diff --git a/blimp/client/core/contents/blimp_contents_manager.h b/blimp/client/core/contents/blimp_contents_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9f695541f752557f3a11e88c6e51ee8cfedc9c1d |
| --- /dev/null |
| +++ b/blimp/client/core/contents/blimp_contents_manager.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ |
| +#define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ |
| + |
| +#include "blimp/client/core/contents/blimp_contents_impl.h" |
| + |
| +namespace blimp { |
| +namespace client { |
| + |
| +class BlimpContentsManager { |
|
nyquist
2016/08/05 23:03:23
It would be great with a high level description of
Menglin
2016/08/06 00:57:00
Done
|
| + public: |
| + BlimpContentsManager(); |
| + ~BlimpContentsManager(); |
| + |
| + std::unique_ptr<BlimpContentsImpl> CreateBlimpContents(); |
|
nyquist
2016/08/05 23:03:23
It's probably helpful to add a comment for each of
Menglin
2016/08/06 00:57:00
Given I added high level description for the class
|
| + BlimpContentsImpl* GetBlimpContents(int id); |
| + |
| + private: |
| + class BlimpContentsDeletionObserver; |
| + friend class BlimpContentsDeletionObserver; |
| + |
| + int CreateBlimpContentsId(); |
|
nyquist
2016/08/05 23:03:23
I think it's helpful to in general document what t
Menglin
2016/08/06 00:57:00
Done.
|
| + void EraseObserverFromMap(int id); |
| + base::WeakPtr<BlimpContentsManager> GetWeakPtr(); |
| + |
| + std::map<int, std::unique_ptr<BlimpContentsDeletionObserver>> observer_map_; |
|
nyquist
2016/08/05 23:03:23
Could you explain what this does?
Menglin
2016/08/06 00:57:00
Done.
|
| + |
| + base::WeakPtrFactory<BlimpContentsManager> weak_ptr_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(BlimpContentsManager); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ |