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

Side by Side Diff: sky/viewer/document_view.h

Issue 783973002: Remove shutdown code from sky. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 years 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
« no previous file with comments | « sky/viewer/content_handler_impl.cc ('k') | sky/viewer/document_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SKY_VIEWER_DOCUMENT_VIEW_H_ 5 #ifndef SKY_VIEWER_DOCUMENT_VIEW_H_
6 #define SKY_VIEWER_DOCUMENT_VIEW_H_ 6 #define SKY_VIEWER_DOCUMENT_VIEW_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "mojo/public/cpp/application/lazy_interface_ptr.h" 10 #include "mojo/public/cpp/application/lazy_interface_ptr.h"
(...skipping 29 matching lines...) Expand all
40 class LayerHost; 40 class LayerHost;
41 41
42 class DocumentView : public blink::ServiceProvider, 42 class DocumentView : public blink::ServiceProvider,
43 public blink::WebViewClient, 43 public blink::WebViewClient,
44 public blink::WebFrameClient, 44 public blink::WebFrameClient,
45 public sky::LayerClient, 45 public sky::LayerClient,
46 public sky::LayerHostClient, 46 public sky::LayerHostClient,
47 public mojo::ViewManagerDelegate, 47 public mojo::ViewManagerDelegate,
48 public mojo::ViewObserver { 48 public mojo::ViewObserver {
49 public: 49 public:
50 DocumentView(const base::Closure& destruction_callback, 50 DocumentView(mojo::ServiceProviderPtr provider,
51 mojo::ServiceProviderPtr provider,
52 mojo::URLResponsePtr response, 51 mojo::URLResponsePtr response,
53 mojo::Shell* shell); 52 mojo::Shell* shell);
54 virtual ~DocumentView(); 53 virtual ~DocumentView();
55 54
56 base::WeakPtr<DocumentView> GetWeakPtr(); 55 base::WeakPtr<DocumentView> GetWeakPtr();
57 56
58 blink::WebView* web_view() const { return web_view_; } 57 blink::WebView* web_view() const { return web_view_; }
59 mojo::ServiceProvider* imported_services() const { 58 mojo::ServiceProvider* imported_services() const {
60 return imported_services_.get(); 59 return imported_services_.get();
61 } 60 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void OnViewBoundsChanged(mojo::View* view, 108 void OnViewBoundsChanged(mojo::View* view,
110 const mojo::Rect& old_bounds, 109 const mojo::Rect& old_bounds,
111 const mojo::Rect& new_bounds) override; 110 const mojo::Rect& new_bounds) override;
112 void OnViewFocusChanged(mojo::View* gained_focus, 111 void OnViewFocusChanged(mojo::View* gained_focus,
113 mojo::View* lost_focus) override; 112 mojo::View* lost_focus) override;
114 void OnViewDestroyed(mojo::View* view) override; 113 void OnViewDestroyed(mojo::View* view) override;
115 void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override; 114 void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override;
116 115
117 void Load(mojo::URLResponsePtr response); 116 void Load(mojo::URLResponsePtr response);
118 117
119 base::Closure destruction_callback_;
120 mojo::URLResponsePtr response_; 118 mojo::URLResponsePtr response_;
121 mojo::ServiceProviderImpl exported_services_; 119 mojo::ServiceProviderImpl exported_services_;
122 scoped_ptr<mojo::ServiceProvider> imported_services_; 120 scoped_ptr<mojo::ServiceProvider> imported_services_;
123 mojo::Shell* shell_; 121 mojo::Shell* shell_;
124 mojo::LazyInterfacePtr<mojo::NavigatorHost> navigator_host_; 122 mojo::LazyInterfacePtr<mojo::NavigatorHost> navigator_host_;
125 blink::WebView* web_view_; 123 blink::WebView* web_view_;
126 mojo::View* root_; 124 mojo::View* root_;
127 mojo::ViewManagerClientFactory view_manager_client_factory_; 125 mojo::ViewManagerClientFactory view_manager_client_factory_;
128 InspectorServiceFactory inspector_service_factory_; 126 InspectorServiceFactory inspector_service_factory_;
129 scoped_ptr<LayerHost> layer_host_; 127 scoped_ptr<LayerHost> layer_host_;
130 scoped_refptr<Layer> root_layer_; 128 scoped_refptr<Layer> root_layer_;
131 scoped_ptr<ScriptRunner> script_runner_; 129 scoped_ptr<ScriptRunner> script_runner_;
132 scoped_ptr<InspectorHostImpl> inspector_host_; 130 scoped_ptr<InspectorHostImpl> inspector_host_;
133 scoped_ptr<inspector::InspectorBackendMojo> inspector_backend_; 131 scoped_ptr<inspector::InspectorBackendMojo> inspector_backend_;
134 int debugger_id_; 132 int debugger_id_;
135 133
136 base::WeakPtrFactory<DocumentView> weak_factory_; 134 base::WeakPtrFactory<DocumentView> weak_factory_;
137 DISALLOW_COPY_AND_ASSIGN(DocumentView); 135 DISALLOW_COPY_AND_ASSIGN(DocumentView);
138 }; 136 };
139 137
140 } // namespace sky 138 } // namespace sky
141 139
142 #endif // SKY_VIEWER_DOCUMENT_VIEW_H_ 140 #endif // SKY_VIEWER_DOCUMENT_VIEW_H_
OLDNEW
« no previous file with comments | « sky/viewer/content_handler_impl.cc ('k') | sky/viewer/document_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698