| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "android_webview/native/aw_dev_tools_server.h" | 5 #include "android_webview/native/aw_dev_tools_server.h" |
| 6 | 6 |
| 7 #include "android_webview/native/aw_contents.h" | 7 #include "android_webview/native/aw_contents.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 const char kTargetTypePage[] = "page"; | 33 const char kTargetTypePage[] = "page"; |
| 34 | 34 |
| 35 std::string GetViewDescription(WebContents* web_contents); | 35 std::string GetViewDescription(WebContents* web_contents); |
| 36 | 36 |
| 37 class Target : public content::DevToolsTarget { | 37 class Target : public content::DevToolsTarget { |
| 38 public: | 38 public: |
| 39 explicit Target(WebContents* web_contents); | 39 explicit Target(WebContents* web_contents); |
| 40 | 40 |
| 41 virtual std::string GetId() const OVERRIDE { return id_; } | 41 virtual std::string GetId() const OVERRIDE { return id_; } |
| 42 virtual std::string GetParentId() const OVERRIDE { return std::string(); } |
| 42 virtual std::string GetType() const OVERRIDE { return kTargetTypePage; } | 43 virtual std::string GetType() const OVERRIDE { return kTargetTypePage; } |
| 43 virtual std::string GetTitle() const OVERRIDE { return title_; } | 44 virtual std::string GetTitle() const OVERRIDE { return title_; } |
| 44 virtual std::string GetDescription() const OVERRIDE { return description_; } | 45 virtual std::string GetDescription() const OVERRIDE { return description_; } |
| 45 virtual GURL GetURL() const OVERRIDE { return url_; } | 46 virtual GURL GetURL() const OVERRIDE { return url_; } |
| 46 virtual GURL GetFaviconURL() const OVERRIDE { return GURL(); } | 47 virtual GURL GetFaviconURL() const OVERRIDE { return GURL(); } |
| 47 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { | 48 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { |
| 48 return last_activity_time_; | 49 return last_activity_time_; |
| 49 } | 50 } |
| 50 virtual bool IsAttached() const OVERRIDE { | 51 virtual bool IsAttached() const OVERRIDE { |
| 51 return agent_host_->IsAttached(); | 52 return agent_host_->IsAttached(); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 AwDevToolsServer* devtools_server = | 217 AwDevToolsServer* devtools_server = |
| 217 reinterpret_cast<AwDevToolsServer*>(server); | 218 reinterpret_cast<AwDevToolsServer*>(server); |
| 218 if (enabled) { | 219 if (enabled) { |
| 219 devtools_server->Start(); | 220 devtools_server->Start(); |
| 220 } else { | 221 } else { |
| 221 devtools_server->Stop(); | 222 devtools_server->Stop(); |
| 222 } | 223 } |
| 223 } | 224 } |
| 224 | 225 |
| 225 } // namespace android_webview | 226 } // namespace android_webview |
| OLD | NEW |