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

Side by Side Diff: sky/shell/ui/engine.h

Issue 1203143004: Make it possible to run Sky apps offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: gn check Created 5 years, 6 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
« no previous file with comments | « sky/shell/linux/main.cc ('k') | sky/shell/ui/engine.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SHELL_UI_ENGINE_H_ 5 #ifndef SKY_SHELL_UI_ENGINE_H_
6 #define SKY_SHELL_UI_ENGINE_H_ 6 #define SKY_SHELL_UI_ENGINE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // UIDelegate methods: 62 // UIDelegate methods:
63 void ConnectToViewportObserver( 63 void ConnectToViewportObserver(
64 mojo::InterfaceRequest<ViewportObserver> request) override; 64 mojo::InterfaceRequest<ViewportObserver> request) override;
65 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; 65 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
66 void OnOutputSurfaceDestroyed() override; 66 void OnOutputSurfaceDestroyed() override;
67 67
68 // ViewportObserver: 68 // ViewportObserver:
69 void OnViewportMetricsChanged(int width, int height, 69 void OnViewportMetricsChanged(int width, int height,
70 float device_pixel_ratio) override; 70 float device_pixel_ratio) override;
71 void OnInputEvent(InputEventPtr event) override; 71 void OnInputEvent(InputEventPtr event) override;
72 void LoadURL(const mojo::String& url) override; 72
73 void RunFromNetwork(const mojo::String& url) override;
74 void RunFromFile(const mojo::String& main,
75 const mojo::String& package_root) override;
76 void RunFromSnapshot(mojo::ScopedDataPipeConsumerHandle snapshot) override;
73 77
74 // WebViewClient methods: 78 // WebViewClient methods:
75 void frameDetached(blink::WebFrame*) override; 79 void frameDetached(blink::WebFrame*) override;
76 void initializeLayerTreeView() override; 80 void initializeLayerTreeView() override;
77 void scheduleVisualUpdate() override; 81 void scheduleVisualUpdate() override;
78 blink::WebScreenInfo screenInfo() override; 82 blink::WebScreenInfo screenInfo() override;
79 blink::ServiceProvider* services() override; 83 blink::ServiceProvider* services() override;
80 84
81 // WebFrameClient methods: 85 // WebFrameClient methods:
82 void didCreateIsolate(blink::WebLocalFrame* frame, 86 void didCreateIsolate(blink::WebLocalFrame* frame,
83 Dart_Isolate isolate) override; 87 Dart_Isolate isolate) override;
84 88
85 // SkyViewClient methods: 89 // SkyViewClient methods:
86 void ScheduleFrame() override; 90 void ScheduleFrame() override;
87 void DidCreateIsolate(Dart_Isolate isolate) override; 91 void DidCreateIsolate(Dart_Isolate isolate) override;
88 92
89 // Services methods: 93 // Services methods:
90 mojo::NavigatorHost* NavigatorHost() override; 94 mojo::NavigatorHost* NavigatorHost() override;
91 95
92 // NavigatorHost methods: 96 // NavigatorHost methods:
93 void RequestNavigate(mojo::Target target, 97 void RequestNavigate(mojo::Target target,
94 mojo::URLRequestPtr request) override; 98 mojo::URLRequestPtr request) override;
95 void DidNavigateLocally(const mojo::String& url) override; 99 void DidNavigateLocally(const mojo::String& url) override;
96 void RequestNavigateHistory(int32_t delta) override; 100 void RequestNavigateHistory(int32_t delta) override;
97 101
102 void RunFromLibrary(const mojo::String& name);
103 void CloseWebViewIfNeeded();
104 void LoadUsingWebView(const mojo::String& mojo_url);
105
98 void UpdateSkyViewSize(); 106 void UpdateSkyViewSize();
99 void UpdateWebViewSize(); 107 void UpdateWebViewSize();
100 108
101 Config config_; 109 Config config_;
102 scoped_ptr<Animator> animator_; 110 scoped_ptr<Animator> animator_;
103 111
112 scoped_ptr<blink::DartLibraryProvider> dart_library_provider_;
104 std::unique_ptr<blink::SkyView> sky_view_; 113 std::unique_ptr<blink::SkyView> sky_view_;
105 blink::WebView* web_view_; 114 blink::WebView* web_view_;
106 115
107 float device_pixel_ratio_; 116 float device_pixel_ratio_;
108 gfx::Size physical_size_; 117 gfx::Size physical_size_;
109 mojo::Binding<ViewportObserver> viewport_observer_binding_; 118 mojo::Binding<ViewportObserver> viewport_observer_binding_;
110 119
111 base::WeakPtrFactory<Engine> weak_factory_; 120 base::WeakPtrFactory<Engine> weak_factory_;
112 121
113 DISALLOW_COPY_AND_ASSIGN(Engine); 122 DISALLOW_COPY_AND_ASSIGN(Engine);
114 }; 123 };
115 124
116 } // namespace shell 125 } // namespace shell
117 } // namespace sky 126 } // namespace sky
118 127
119 #endif // SKY_SHELL_UI_ENGINE_H_ 128 #endif // SKY_SHELL_UI_ENGINE_H_
OLDNEW
« no previous file with comments | « sky/shell/linux/main.cc ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698