| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ | 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ |
| 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ | 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ |
| 7 | 7 |
| 8 #include "blimp/client/core/contents/blimp_contents_impl.h" | 8 #include "blimp/client/core/contents/blimp_contents_impl.h" |
| 9 | 9 |
| 10 namespace blimp { | 10 namespace blimp { |
| 11 namespace client { | 11 namespace client { |
| 12 | 12 |
| 13 // BlimpContentsManager does the real work of creating BlimpContentsImpl, and | 13 // BlimpContentsManager does the real work of creating BlimpContentsImpl, and |
| 14 // then passes the ownership to the caller. It also owns the observers to | 14 // then passes the ownership to the caller. It also owns the observers to |
| 15 // monitor the life time of the contents it creates. | 15 // monitor the life time of the contents it creates. |
| 16 class BlimpContentsManager { | 16 class BlimpContentsManager { |
| 17 public: | 17 public: |
| 18 BlimpContentsManager(); | 18 BlimpContentsManager(); |
| 19 ~BlimpContentsManager(); | 19 ~BlimpContentsManager(); |
| 20 | 20 |
| 21 std::unique_ptr<BlimpContentsImpl> CreateBlimpContents(); | 21 std::unique_ptr<BlimpContentsImpl> CreateBlimpContents( |
| 22 NavigationFeature* nav_feature, |
| 23 ImeFeature* ime_feature); |
| 22 | 24 |
| 23 // The caller can query the contents through its id. | 25 // The caller can query the contents through its id. |
| 24 BlimpContentsImpl* GetBlimpContents(int id); | 26 BlimpContentsImpl* GetBlimpContents(int id); |
| 25 | 27 |
| 26 private: | 28 private: |
| 27 class BlimpContentsDeletionObserver; | 29 class BlimpContentsDeletionObserver; |
| 28 friend class BlimpContentsDeletionObserver; | 30 friend class BlimpContentsDeletionObserver; |
| 29 | 31 |
| 30 // When creating the BlimpContentsImpl, an id is created for the content. | 32 // When creating the BlimpContentsImpl, an id is created for the content. |
| 31 int CreateBlimpContentsId(); | 33 int CreateBlimpContentsId(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 42 | 44 |
| 43 base::WeakPtrFactory<BlimpContentsManager> weak_ptr_factory_; | 45 base::WeakPtrFactory<BlimpContentsManager> weak_ptr_factory_; |
| 44 | 46 |
| 45 DISALLOW_COPY_AND_ASSIGN(BlimpContentsManager); | 47 DISALLOW_COPY_AND_ASSIGN(BlimpContentsManager); |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 } // namespace client | 50 } // namespace client |
| 49 } // namespace blimp | 51 } // namespace blimp |
| 50 | 52 |
| 51 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ | 53 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ |
| OLD | NEW |