| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { | 80 virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { |
| 81 return last_activity_time_; | 81 return last_activity_time_; |
| 82 } | 82 } |
| 83 | 83 |
| 84 protected: | 84 protected: |
| 85 explicit TargetBase(WebContents* web_contents) | 85 explicit TargetBase(WebContents* web_contents) |
| 86 : title_(base::UTF16ToUTF8(web_contents->GetTitle())), | 86 : title_(base::UTF16ToUTF8(web_contents->GetTitle())), |
| 87 url_(web_contents->GetURL()), | 87 url_(web_contents->GetURL()), |
| 88 favicon_url_(GetFaviconURL(web_contents)), | 88 favicon_url_(GetFaviconURL(web_contents)), |
| 89 last_activity_time_(web_contents->GetLastSelectedTime()) { | 89 last_activity_time_(web_contents->GetLastActiveTime()) { |
| 90 } | 90 } |
| 91 | 91 |
| 92 TargetBase(const base::string16& title, const GURL& url) | 92 TargetBase(const base::string16& title, const GURL& url) |
| 93 : title_(base::UTF16ToUTF8(title)), | 93 : title_(base::UTF16ToUTF8(title)), |
| 94 url_(url) | 94 url_(url) |
| 95 {} | 95 {} |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 const std::string title_; | 98 const std::string title_; |
| 99 const GURL url_; | 99 const GURL url_; |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 jobject obj, | 461 jobject obj, |
| 462 jint server, | 462 jint server, |
| 463 jboolean enabled) { | 463 jboolean enabled) { |
| 464 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); | 464 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); |
| 465 if (enabled) { | 465 if (enabled) { |
| 466 devtools_server->Start(); | 466 devtools_server->Start(); |
| 467 } else { | 467 } else { |
| 468 devtools_server->Stop(); | 468 devtools_server->Stop(); |
| 469 } | 469 } |
| 470 } | 470 } |
| OLD | NEW |