| 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_IMPL_H_ | 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ |
| 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ | 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "blimp/client/core/compositor/blimp_compositor_manager.h" | |
| 11 #include "blimp/client/core/contents/blimp_contents_view_impl.h" | 10 #include "blimp/client/core/contents/blimp_contents_view_impl.h" |
| 12 #include "blimp/client/core/contents/blimp_navigation_controller_delegate.h" | 11 #include "blimp/client/core/contents/blimp_navigation_controller_delegate.h" |
| 13 #include "blimp/client/core/contents/blimp_navigation_controller_impl.h" | 12 #include "blimp/client/core/contents/blimp_navigation_controller_impl.h" |
| 13 #include "blimp/client/core/render_widget/blimp_document_manager.h" |
| 14 #include "blimp/client/public/contents/blimp_contents.h" | 14 #include "blimp/client/public/contents/blimp_contents.h" |
| 15 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) |
| 20 #include "base/android/scoped_java_ref.h" | 20 #include "base/android/scoped_java_ref.h" |
| 21 #endif // defined(OS_ANDROID) | 21 #endif // defined(OS_ANDROID) |
| 22 | 22 |
| 23 namespace blimp { | 23 namespace blimp { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void OnLoadingStateChanged(bool loading) override; | 73 void OnLoadingStateChanged(bool loading) override; |
| 74 void OnPageLoadingStateChanged(bool loading) override; | 74 void OnPageLoadingStateChanged(bool loading) override; |
| 75 | 75 |
| 76 // Pushes the size and scale information to the engine, which will affect the | 76 // Pushes the size and scale information to the engine, which will affect the |
| 77 // web content display area for all tabs. | 77 // web content display area for all tabs. |
| 78 void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio); | 78 void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio); |
| 79 | 79 |
| 80 int id() { return id_; } | 80 int id() { return id_; } |
| 81 | 81 |
| 82 // TODO(nyquist): Remove this once the Android BlimpView uses a delegate. | 82 // TODO(nyquist): Remove this once the Android BlimpView uses a delegate. |
| 83 BlimpCompositorManager* compositor_manager() { return &compositor_manager_; } | 83 BlimpDocumentManager* document_manager() { return &document_manager_; } |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 // Handles the back/forward list and loading URLs. | 86 // Handles the back/forward list and loading URLs. |
| 87 BlimpNavigationControllerImpl navigation_controller_; | 87 BlimpNavigationControllerImpl navigation_controller_; |
| 88 | 88 |
| 89 // Holds onto all active BlimpCompositor instances for this BlimpContents. | 89 // Holds onto all active BlimpDocument and BlimpCompositor instances for |
| 90 // this BlimpContents. |
| 90 // This properly exposes the right rendered page content for the correct | 91 // This properly exposes the right rendered page content for the correct |
| 91 // BlimpCompositor based on the engine state. | 92 // BlimpCompositor based on the engine state. |
| 92 BlimpCompositorManager compositor_manager_; | 93 BlimpDocumentManager document_manager_; |
| 93 | 94 |
| 94 // A list of all the observers of this BlimpContentsImpl. | 95 // A list of all the observers of this BlimpContentsImpl. |
| 95 base::ObserverList<BlimpContentsObserver> observers_; | 96 base::ObserverList<BlimpContentsObserver> observers_; |
| 96 | 97 |
| 97 // The id is assigned during contents creation. It is used by | 98 // The id is assigned during contents creation. It is used by |
| 98 // BlimpContentsManager to control the life time of the its observer. | 99 // BlimpContentsManager to control the life time of the its observer. |
| 99 int id_; | 100 int id_; |
| 100 | 101 |
| 101 // Handles the text input for web forms. | 102 // Handles the text input for web forms. |
| 102 ImeFeature* ime_feature_; | 103 ImeFeature* ime_feature_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 114 // from the BlimpContents. | 115 // from the BlimpContents. |
| 115 std::unique_ptr<BlimpContentsViewImpl> blimp_contents_view_; | 116 std::unique_ptr<BlimpContentsViewImpl> blimp_contents_view_; |
| 116 | 117 |
| 117 DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl); | 118 DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 } // namespace client | 121 } // namespace client |
| 121 } // namespace blimp | 122 } // namespace blimp |
| 122 | 123 |
| 123 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ | 124 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ |
| OLD | NEW |