OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/android/dev_tools_server.h" | 5 #include "chrome/browser/android/dev_tools_server.h" |
6 | 6 |
7 #include <pwd.h> | 7 #include <pwd.h> |
8 #include <cstring> | 8 #include <cstring> |
9 | 9 |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 content::NavigationController& controller = web_contents->GetController(); | 72 content::NavigationController& controller = web_contents->GetController(); |
73 content::NavigationEntry* entry = controller.GetActiveEntry(); | 73 content::NavigationEntry* entry = controller.GetActiveEntry(); |
74 if (entry != NULL && entry->GetURL().is_valid()) | 74 if (entry != NULL && entry->GetURL().is_valid()) |
75 return entry->GetFavicon().url; | 75 return entry->GetFavicon().url; |
76 return GURL(); | 76 return GURL(); |
77 } | 77 } |
78 | 78 |
79 class TargetBase : public content::DevToolsTarget { | 79 class TargetBase : public content::DevToolsTarget { |
80 public: | 80 public: |
81 // content::DevToolsTarget implementation: | 81 // content::DevToolsTarget implementation: |
| 82 virtual std::string GetParentId() const OVERRIDE { return std::string(); } |
| 83 |
82 virtual std::string GetTitle() const OVERRIDE { return title_; } | 84 virtual std::string GetTitle() const OVERRIDE { return title_; } |
83 | 85 |
84 virtual std::string GetDescription() const OVERRIDE { return std::string(); } | 86 virtual std::string GetDescription() const OVERRIDE { return std::string(); } |
85 | 87 |
86 virtual GURL GetURL() const OVERRIDE { return url_; } | 88 virtual GURL GetURL() const OVERRIDE { return url_; } |
87 | 89 |
88 virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; } | 90 virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; } |
89 | 91 |
90 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { | 92 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { |
91 return last_activity_time_; | 93 return last_activity_time_; |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 jobject obj, | 469 jobject obj, |
468 jlong server, | 470 jlong server, |
469 jboolean enabled) { | 471 jboolean enabled) { |
470 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); | 472 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); |
471 if (enabled) { | 473 if (enabled) { |
472 devtools_server->Start(); | 474 devtools_server->Start(); |
473 } else { | 475 } else { |
474 devtools_server->Stop(); | 476 devtools_server->Stop(); |
475 } | 477 } |
476 } | 478 } |
OLD | NEW |