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

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

Issue 138913021: Avoid discarding freshly created background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (last_selected) Created 6 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « android_webview/native/aw_dev_tools_server.cc ('k') | chrome/browser/chromeos/memory/oom_priority_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698