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

Side by Side Diff: blimp/client/core/context/blimp_client_context_impl.cc

Issue 2463423002: Add Settings[, Oberser] java code and JNI bridge. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
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 #include "blimp/client/core/context/blimp_client_context_impl.h" 5 #include "blimp/client/core/context/blimp_client_context_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 17 matching lines...) Expand all
28 #include "blimp/client/core/switches/blimp_client_switches.h" 28 #include "blimp/client/core/switches/blimp_client_switches.h"
29 #include "blimp/client/public/blimp_client_context_delegate.h" 29 #include "blimp/client/public/blimp_client_context_delegate.h"
30 #include "blimp/client/public/compositor/compositor_dependencies.h" 30 #include "blimp/client/public/compositor/compositor_dependencies.h"
31 #include "components/prefs/pref_service.h" 31 #include "components/prefs/pref_service.h"
32 #include "device/geolocation/geolocation_delegate.h" 32 #include "device/geolocation/geolocation_delegate.h"
33 #include "device/geolocation/location_arbitrator.h" 33 #include "device/geolocation/location_arbitrator.h"
34 #include "ui/gfx/native_widget_types.h" 34 #include "ui/gfx/native_widget_types.h"
35 35
36 #if defined(OS_ANDROID) 36 #if defined(OS_ANDROID)
37 #include "blimp/client/core/context/android/blimp_client_context_impl_android.h" 37 #include "blimp/client/core/context/android/blimp_client_context_impl_android.h"
38 #include "blimp/client/core/settings/android/settings_android.h"
38 #endif // OS_ANDROID 39 #endif // OS_ANDROID
39 40
40 namespace blimp { 41 namespace blimp {
41 namespace client { 42 namespace client {
42 43
43 namespace { 44 namespace {
44 45
45 const char kDefaultAssignerUrl[] = 46 const char kDefaultAssignerUrl[] =
46 "https://blimp-pa.googleapis.com/v1/assignment"; 47 "https://blimp-pa.googleapis.com/v1/assignment";
47 48
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 95 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
95 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 96 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
96 std::unique_ptr<CompositorDependencies> compositor_dependencies, 97 std::unique_ptr<CompositorDependencies> compositor_dependencies,
97 PrefService* local_state) 98 PrefService* local_state)
98 : BlimpClientContext(), 99 : BlimpClientContext(),
99 io_thread_task_runner_(io_thread_task_runner), 100 io_thread_task_runner_(io_thread_task_runner),
100 file_thread_task_runner_(file_thread_task_runner), 101 file_thread_task_runner_(file_thread_task_runner),
101 blimp_compositor_dependencies_( 102 blimp_compositor_dependencies_(
102 base::MakeUnique<BlimpCompositorDependencies>( 103 base::MakeUnique<BlimpCompositorDependencies>(
103 std::move(compositor_dependencies))), 104 std::move(compositor_dependencies))),
105 #if defined(OS_ANDROID)
David Trainor- moved to gerrit 2016/11/03 03:05:10 Can we pass the settings object in the constructor
Menglin 2016/11/03 23:17:01 yes we can do that to avoid #if in the constructor
106 settings_(base::MakeUnique<SettingsAndroid>(local_state)),
107 #else
104 settings_(base::MakeUnique<Settings>(local_state)), 108 settings_(base::MakeUnique<Settings>(local_state)),
109 #endif
105 blob_channel_feature_(new BlobChannelFeature(this)), 110 blob_channel_feature_(new BlobChannelFeature(this)),
106 geolocation_feature_(base::MakeUnique<GeolocationFeature>( 111 geolocation_feature_(base::MakeUnique<GeolocationFeature>(
107 base::MakeUnique<device::LocationArbitrator>( 112 base::MakeUnique<device::LocationArbitrator>(
108 base::MakeUnique<device::GeolocationDelegate>()))), 113 base::MakeUnique<device::GeolocationDelegate>()))),
109 ime_feature_(new ImeFeature), 114 ime_feature_(new ImeFeature),
110 navigation_feature_(new NavigationFeature), 115 navigation_feature_(new NavigationFeature),
111 render_widget_feature_(new RenderWidgetFeature), 116 render_widget_feature_(new RenderWidgetFeature),
112 settings_feature_(base::MakeUnique<SettingsFeature>(settings_.get())), 117 settings_feature_(base::MakeUnique<SettingsFeature>(settings_.get())),
113 tab_control_feature_(new TabControlFeature), 118 tab_control_feature_(new TabControlFeature),
114 blimp_contents_manager_( 119 blimp_contents_manager_(
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (result >= 0) { 274 if (result >= 0) {
270 delegate_->OnEngineDisconnected(result); 275 delegate_->OnEngineDisconnected(result);
271 } else { 276 } else {
272 delegate_->OnNetworkDisconnected(result); 277 delegate_->OnNetworkDisconnected(result);
273 } 278 }
274 } 279 }
275 } 280 }
276 281
277 } // namespace client 282 } // namespace client
278 } // namespace blimp 283 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698