Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: chrome/browser/android/devtools_manager_delegate_android.cc

Issue 2678783005: DevTools: return remote debugging targets sorted by last active time (as it was long ago). (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/devtools/device/devtools_device_discovery.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/devtools_manager_delegate_android.h" 5 #include "chrome/browser/android/devtools_manager_delegate_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 bool Close() override { 106 bool Close() override {
107 TabModel* model; 107 TabModel* model;
108 int index; 108 int index;
109 if (!FindTab(&model, &index)) 109 if (!FindTab(&model, &index))
110 return false; 110 return false;
111 model->CloseTabAt(index); 111 model->CloseTabAt(index);
112 return true; 112 return true;
113 } 113 }
114 114
115 base::TimeTicks GetLastActivityTime() override {
116 return agent_host_ ? agent_host_->GetLastActivityTime() : base::TimeTicks();
117 }
118
115 void SendMessageToBackend(const std::string& message) override { 119 void SendMessageToBackend(const std::string& message) override {
116 if (agent_host_) 120 if (agent_host_)
117 agent_host_->DispatchProtocolMessage(this, message); 121 agent_host_->DispatchProtocolMessage(this, message);
118 } 122 }
119 123
120 private: 124 private:
121 void MaterializeAgentHost() { 125 void MaterializeAgentHost() {
122 if (agent_host_) 126 if (agent_host_)
123 return; 127 return;
124 TabModel* model; 128 TabModel* model;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 266
263 void DevToolsManagerDelegateAndroid::DevToolsAgentHostAttached( 267 void DevToolsManagerDelegateAndroid::DevToolsAgentHostAttached(
264 content::DevToolsAgentHost* agent_host) { 268 content::DevToolsAgentHost* agent_host) {
265 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, true); 269 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, true);
266 } 270 }
267 271
268 void DevToolsManagerDelegateAndroid::DevToolsAgentHostDetached( 272 void DevToolsManagerDelegateAndroid::DevToolsAgentHostDetached(
269 content::DevToolsAgentHost* agent_host) { 273 content::DevToolsAgentHost* agent_host) {
270 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, false); 274 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, false);
271 } 275 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/device/devtools_device_discovery.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698