OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 package org.chromium.sdk.internal.wip; | 5 package org.chromium.sdk.internal.wip; |
6 | 6 |
7 import java.io.IOException; | 7 import java.io.IOException; |
8 import java.io.OutputStream; | 8 import java.io.OutputStream; |
9 import java.net.InetSocketAddress; | 9 import java.net.InetSocketAddress; |
10 import java.net.URI; | 10 import java.net.URI; |
(...skipping 17 matching lines...) Expand all Loading... |
28 import org.chromium.sdk.wip.WipBrowserFactory.LoggerFactory; | 28 import org.chromium.sdk.wip.WipBrowserFactory.LoggerFactory; |
29 import org.chromium.sdk.wip.WipBrowserTab; | 29 import org.chromium.sdk.wip.WipBrowserTab; |
30 import org.json.simple.parser.JSONParser; | 30 import org.json.simple.parser.JSONParser; |
31 import org.json.simple.parser.ParseException; | 31 import org.json.simple.parser.ParseException; |
32 | 32 |
33 public class WipBackendImpl extends WipBackendBase { | 33 public class WipBackendImpl extends WipBackendBase { |
34 private static final int DEFAULT_CONNECTION_TIMEOUT_MS = 1000; | 34 private static final int DEFAULT_CONNECTION_TIMEOUT_MS = 1000; |
35 | 35 |
36 private static final boolean USE_OLD_WEBSOCKET = false; | 36 private static final boolean USE_OLD_WEBSOCKET = false; |
37 | 37 |
38 private static final String ID = "current development"; | 38 private static final String ID = "WK@102439"; |
39 private static final String DESCRIPTION = | 39 private static final String DESCRIPTION = |
40 "Google Chrome/Chromium: \n" + | 40 "Google Chrome/Chromium: 17.0.963.5\n" + |
41 "Chromium build: \n" + | 41 "WebKit revision: 102439\n"; |
42 "WebKit revision: \n"; | |
43 | 42 |
44 public WipBackendImpl() { | 43 public WipBackendImpl() { |
45 super(ID, DESCRIPTION); | 44 super(ID, DESCRIPTION); |
46 } | 45 } |
47 | 46 |
48 @Override | 47 @Override |
49 public List<? extends WipTabConnector> getTabs(final WipBrowserImpl browserImp
l) | 48 public List<? extends WipTabConnector> getTabs(final WipBrowserImpl browserImp
l) |
50 throws IOException { | 49 throws IOException { |
51 InetSocketAddress socketAddress = browserImpl.getSocketAddress(); | 50 InetSocketAddress socketAddress = browserImpl.getSocketAddress(); |
52 | 51 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 201 |
203 try { | 202 try { |
204 WipTabList tabList = WipParserAccess.get().parseTabList(jsonValue); | 203 WipTabList tabList = WipParserAccess.get().parseTabList(jsonValue); |
205 return tabList.asTabList(); | 204 return tabList.asTabList(); |
206 } catch (JsonProtocolParseException e) { | 205 } catch (JsonProtocolParseException e) { |
207 throw new IOException( | 206 throw new IOException( |
208 "Failed to parse tab list response (on protocol level)", e); | 207 "Failed to parse tab list response (on protocol level)", e); |
209 } | 208 } |
210 } | 209 } |
211 } | 210 } |
OLD | NEW |