本文整理汇总了Java中com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain类的典型用法代码示例。如果您正苦于以下问题:Java ChromeDevtoolsDomain类的具体用法?Java ChromeDevtoolsDomain怎么用?Java ChromeDevtoolsDomain使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChromeDevtoolsDomain类属于com.facebook.stetho.inspector.protocol包,在下文中一共展示了ChromeDevtoolsDomain类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: get
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
final List<ChromeDevtoolsDomain> modules = new ArrayList<>();
final Iterable<ChromeDevtoolsDomain> base = baseProvider.get();
if (base != null) {
for (ChromeDevtoolsDomain domain : base) {
// TODO Make it work with SQLite.
if (!(domain instanceof com.facebook.stetho.inspector.protocol.module.Database)) {
modules.add(domain);
}
}
}
modules.add(
new Database(applicationContext.getPackageName(), dirs, namePattern, encryptionKeys));
return modules;
}
开发者ID:xizzhu,项目名称:stetho-realm,代码行数:20,代码来源:StethoRealmInspectorModulesProvider.java
示例2: get
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
return new Stetho.DefaultInspectorModulesBuilder(context)
.provideDatabaseDriver(new SqliteDatabaseDriver(context,
new DatabaseFilesProvider() {
@Override
public List<File> getDatabaseFiles() {
List<File> list = new ArrayList<>();
list.add(new File(historian.dbPath()));
return list;
}
}, new DatabaseConnectionProvider() {
@Override
public SQLiteDatabase openDatabase(File file) throws SQLiteException {
return historian.getDatabase();
}
}))
.finish();
}
开发者ID:yshrsmz,项目名称:historian,代码行数:20,代码来源:HistorianInspectorModulesProvider.java
示例3: get
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
final List<ChromeDevtoolsDomain> modules = new ArrayList<>();
for (ChromeDevtoolsDomain domain : baseProvider.get()) {
if (domain instanceof com.facebook.stetho.inspector.protocol.module.Database) {
continue;
}
modules.add(domain);
}
modules.add(new Database(
packageName,
new RealmFilesProvider(folder, databaseNamePattern),
withMetaTables,
limit,
ascendingOrder,
defaultEncryptionKey,
encryptionKeys));
return modules;
}
开发者ID:gjyaiya,项目名称:StethoRealm,代码行数:20,代码来源:RealmInspectorModulesProvider.java
示例4: buildDispatchTable
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
private static Map<String, MethodDispatchHelper> buildDispatchTable(
ObjectMapper objectMapper,
Iterable<ChromeDevtoolsDomain> domainHandlers) {
Util.throwIfNull(objectMapper);
HashMap<String, MethodDispatchHelper> methods = new HashMap<String, MethodDispatchHelper>();
for (ChromeDevtoolsDomain domainHandler : Util.throwIfNull(domainHandlers)) {
Class<?> handlerClass = domainHandler.getClass();
String domainName = handlerClass.getSimpleName();
for (Method method : handlerClass.getDeclaredMethods()) {
if (isDevtoolsMethod(method)) {
MethodDispatchHelper dispatchHelper = new MethodDispatchHelper(
objectMapper,
domainHandler,
method);
methods.put(domainName + "." + method.getName(), dispatchHelper);
}
}
}
return Collections.unmodifiableMap(methods);
}
开发者ID:facebook,项目名称:stetho,代码行数:22,代码来源:MethodDispatcher.java
示例5: getInspectorModules
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
private static Iterable<ChromeDevtoolsDomain> getInspectorModules(Context context) {
final ArrayList<ChromeDevtoolsDomain> modules = new ArrayList<>();
final DocumentProviderFactory factory = new RIAndroidDocumentProviderFactory(
(Application) context.getApplicationContext(), Collections.<DescriptorProvider>emptyList());
final Document document = new Document(factory);
modules.add(new DOM(document));
modules.add(new CSS(document));
modules.add(new Page(context));
return modules;
}
开发者ID:nekocode,项目名称:ResourceInspector,代码行数:13,代码来源:ResourceInspector.java
示例6: get
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
final List<ChromeDevtoolsDomain> modules = new ArrayList<>();
for (ChromeDevtoolsDomain domain : Stetho.defaultInspectorModulesProvider(mContext).get()) {
Timber.d("Domain: %s", domain.toString());
if (domain instanceof com.facebook.stetho.inspector.protocol.module.Database) {
continue;
}
modules.add(domain);
}
modules.add(new Database(new CouchbasePeerManager(mContext, mContext.getPackageName(), mShowMetadata)));
return modules;
}
开发者ID:RobotPajamas,项目名称:Stetho-Couchbase,代码行数:15,代码来源:CouchbaseInspectorModulesProvider.java
示例7: initializeWithDefaults
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
/**
* Start the listening server. Most of the heavy lifting initialization is deferred until the
* first socket connection is received, allowing this to be safely used for debug builds on
* even low-end hardware without noticeably affecting performance.
*/
public static void initializeWithDefaults(final Context context) {
initialize(new Initializer(context) {
@Override
protected Iterable<DumperPlugin> getDumperPlugins() {
return new DefaultDumperPluginsBuilder(context).finish();
}
@Override
protected Iterable<ChromeDevtoolsDomain> getInspectorModules() {
return new DefaultInspectorModulesBuilder(context).finish();
}
});
}
开发者ID:facebook,项目名称:stetho,代码行数:19,代码来源:Stetho.java
示例8: defaultInspectorModulesProvider
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public static InspectorModulesProvider defaultInspectorModulesProvider(final Context context) {
return new InspectorModulesProvider() {
@Override
public Iterable<ChromeDevtoolsDomain> get() {
return new DefaultInspectorModulesBuilder(context).finish();
}
};
}
开发者ID:facebook,项目名称:stetho,代码行数:9,代码来源:Stetho.java
示例9: create
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public SocketHandler create() {
ProtocolDetectingSocketHandler socketHandler =
new ProtocolDetectingSocketHandler(mContext);
Iterable<DumperPlugin> dumperPlugins = getDumperPlugins();
if (dumperPlugins != null) {
Dumper dumper = new Dumper(dumperPlugins);
socketHandler.addHandler(
new ProtocolDetectingSocketHandler.ExactMagicMatcher(
DumpappSocketLikeHandler.PROTOCOL_MAGIC),
new DumpappSocketLikeHandler(dumper));
// Support the old HTTP-based protocol since it's relatively straight forward to do.
DumpappHttpSocketLikeHandler legacyHandler = new DumpappHttpSocketLikeHandler(dumper);
socketHandler.addHandler(
new ProtocolDetectingSocketHandler.ExactMagicMatcher(
"GET /dumpapp".getBytes()),
legacyHandler);
socketHandler.addHandler(
new ProtocolDetectingSocketHandler.ExactMagicMatcher(
"POST /dumpapp".getBytes()),
legacyHandler);
}
Iterable<ChromeDevtoolsDomain> inspectorModules = getInspectorModules();
if (inspectorModules != null) {
socketHandler.addHandler(
new ProtocolDetectingSocketHandler.AlwaysMatchMatcher(),
new DevtoolsSocketHandler(mContext, inspectorModules));
}
return socketHandler;
}
开发者ID:facebook,项目名称:stetho,代码行数:36,代码来源:Stetho.java
示例10: MethodDispatchHelper
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public MethodDispatchHelper(ObjectMapper objectMapper,
ChromeDevtoolsDomain instance,
Method method) {
mObjectMapper = objectMapper;
mInstance = instance;
mMethod = method;
}
开发者ID:facebook,项目名称:stetho,代码行数:8,代码来源:MethodDispatcher.java
示例11: onCreate
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (null == demoAppContext) {
demoAppContext = getApplicationContext();
}
// queues = Volley.newRequestQueue(demoAppContext);
// CrashHandler crashHandler = CrashHandler.getInstance();
// crashHandler.init(getApplicationContext());
// crashHandler.initActivityContainer(container);
container = new ArrayList<>(5);
if (Constants.IS_OPEN_UI_BLOCK_CANARY) {
sContext = this;
BlockCanary.install(this, new DemoBlockCanaryContext()).start();
}
if (Constants.IS_OPEN_LEAK_CANARY) {
refWatcher = initLeakCanary();
}
if (Constants.IS_OPEN_STETHO) {
// 查看 dumpapp 信息
// Stetho.initialize(Stetho.newInitializerBuilder(this).enableDumpapp(new DumperPluginsProvider() {
// @Override
// public Iterable<DumperPlugin> get() {
// return new Stetho.DefaultDumperPluginsBuilder(DemoApplication.this).provide(new HelloWorldDumperPlugin()).provide(new APODDumperPlugin(DemoApplication.this.getContentResolver())).finish();
// }
// }).enableWebKitInspector(new ExtInspectorModulesProvider(DemoApplication.this)).build());
// 调用 JS
Stetho.initialize(Stetho.newInitializerBuilder(DemoApplication.this).enableWebKitInspector(new InspectorModulesProvider() {
@Override
public Iterable<ChromeDevtoolsDomain> get() {
return new Stetho.DefaultInspectorModulesBuilder(DemoApplication.this).runtimeRepl(new JsRuntimeReplFactoryBuilder(DemoApplication.this)
// Pass to JavaScript: var foo = "bar";
.addVariable("foo", "bar").build()).finish();
}
}).build());
}
}
开发者ID:BruceHurrican,项目名称:asstudydemo,代码行数:41,代码来源:DemoApplication.java
示例12: RIDevtoolsSocketHandler
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public RIDevtoolsSocketHandler(Context context, Iterable<ChromeDevtoolsDomain> modules) {
mContext = context;
mModules = modules;
mServer = createServer();
}
开发者ID:nekocode,项目名称:ResourceInspector,代码行数:6,代码来源:RIDevtoolsSocketHandler.java
示例13: provideIfDesired
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
private DefaultInspectorModulesBuilder provideIfDesired(ChromeDevtoolsDomain module) {
mDelegate.provideIfDesired(module.getClass().getName(), module);
return this;
}
开发者ID:facebook,项目名称:stetho,代码行数:5,代码来源:Stetho.java
示例14: finish
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public Iterable<ChromeDevtoolsDomain> finish() {
provideIfDesired(new Console());
provideIfDesired(new Debugger());
DocumentProviderFactory documentModel = resolveDocumentProvider();
if (documentModel != null) {
Document document = new Document(documentModel);
provideIfDesired(new DOM(document));
provideIfDesired(new CSS(document));
}
provideIfDesired(new DOMStorage(mContext));
provideIfDesired(new HeapProfiler());
provideIfDesired(new Inspector());
provideIfDesired(new Network(mContext));
provideIfDesired(new Page(mContext));
provideIfDesired(new Profiler());
provideIfDesired(
new Runtime(
mRuntimeRepl != null ?
mRuntimeRepl :
new RhinoDetectingRuntimeReplFactory(mContext)));
provideIfDesired(new Worker());
if (Build.VERSION.SDK_INT >= DatabaseConstants.MIN_API_LEVEL) {
Database database = new Database();
boolean hasSqliteDatabaseDriver = false;
if (mDatabaseDrivers != null) {
for (DatabaseDriver2 databaseDriver : mDatabaseDrivers) {
database.add(databaseDriver);
if (databaseDriver instanceof SqliteDatabaseDriver) {
hasSqliteDatabaseDriver = true;
}
}
}
if (!hasSqliteDatabaseDriver && !mExcludeSqliteDatabaseDriver) {
database.add(
new SqliteDatabaseDriver(mContext,
mDatabaseFilesProvider != null ?
mDatabaseFilesProvider :
new DefaultDatabaseFilesProvider(mContext),
new DefaultDatabaseConnectionProvider()));
}
provideIfDesired(database);
}
return mDelegate.finish();
}
开发者ID:facebook,项目名称:stetho,代码行数:45,代码来源:Stetho.java
示例15: getInspectorModules
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Nullable
protected abstract Iterable<ChromeDevtoolsDomain> getInspectorModules();
开发者ID:facebook,项目名称:stetho,代码行数:3,代码来源:Stetho.java
示例16: DevtoolsSocketHandler
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public DevtoolsSocketHandler(Context context, Iterable<ChromeDevtoolsDomain> modules) {
mContext = context;
mModules = modules;
mServer = createServer();
}
开发者ID:facebook,项目名称:stetho,代码行数:6,代码来源:DevtoolsSocketHandler.java
示例17: MethodDispatcher
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public MethodDispatcher(
ObjectMapper objectMapper,
Iterable<ChromeDevtoolsDomain> domainHandlers) {
mObjectMapper = objectMapper;
mDomainHandlers = domainHandlers;
}
开发者ID:facebook,项目名称:stetho,代码行数:7,代码来源:MethodDispatcher.java
示例18: ChromeDevtoolsServer
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
public ChromeDevtoolsServer(Iterable<ChromeDevtoolsDomain> domainModules) {
mObjectMapper = new ObjectMapper();
mMethodDispatcher = new MethodDispatcher(mObjectMapper, domainModules);
}
开发者ID:facebook,项目名称:stetho,代码行数:5,代码来源:ChromeDevtoolsServer.java
示例19: get
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
return new Stetho.DefaultInspectorModulesBuilder(mContext)
.provideDatabaseDriver(createContentProviderDatabaseDriver(mContext))
.finish();
}
开发者ID:facebook,项目名称:stetho,代码行数:7,代码来源:SampleDebugApplication.java
示例20: get
import com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain; //导入依赖的package包/类
@Override
public Iterable<ChromeDevtoolsDomain> get() {
return new Stetho.DefaultInspectorModulesBuilder(mContext).provideDatabaseDriver
(createContentProviderDatabaseDriver(mContext)).finish();
}
开发者ID:BruceHurrican,项目名称:asstudydemo,代码行数:6,代码来源:DemoApplication.java
注:本文中的com.facebook.stetho.inspector.protocol.ChromeDevtoolsDomain类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论