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

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

Issue 11033046: DevTools: [remote debugging] introduce json/new and json/close for creating and closing the tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments addressed Created 8 years, 2 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/devtools_server.h" 5 #include "chrome/browser/android/devtools_server.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <pwd.h> 8 #include <pwd.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 history::TopSites* top_sites = profile->GetTopSites(); 63 history::TopSites* top_sites = profile->GetTopSites();
64 if (top_sites) { 64 if (top_sites) {
65 scoped_refptr<base::RefCountedMemory> data; 65 scoped_refptr<base::RefCountedMemory> data;
66 if (top_sites->GetPageThumbnail(url, &data)) 66 if (top_sites->GetPageThumbnail(url, &data))
67 return std::string(reinterpret_cast<const char*>(data->front()), 67 return std::string(reinterpret_cast<const char*>(data->front()),
68 data->size()); 68 data->size());
69 } 69 }
70 return ""; 70 return "";
71 } 71 }
72 72
73 content::RenderViewHost* CreateNewTarget() {
74 return NULL;
75 }
76
73 private: 77 private:
74 static void PopulatePageThumbnails() { 78 static void PopulatePageThumbnails() {
75 Profile* profile = 79 Profile* profile =
76 ProfileManager::GetLastUsedProfile()->GetOriginalProfile(); 80 ProfileManager::GetLastUsedProfile()->GetOriginalProfile();
77 history::TopSites* top_sites = profile->GetTopSites(); 81 history::TopSites* top_sites = profile->GetTopSites();
78 if (top_sites) 82 if (top_sites)
79 top_sites->SyncWithHistory(); 83 top_sites->SyncWithHistory();
80 } 84 }
81 85
82 DISALLOW_COPY_AND_ASSIGN(DevToolsServerDelegate); 86 DISALLOW_COPY_AND_ASSIGN(DevToolsServerDelegate);
(...skipping 27 matching lines...) Expand all
110 return; 114 return;
111 // Note that the call to Stop() below takes care of |protocol_handler_| 115 // Note that the call to Stop() below takes care of |protocol_handler_|
112 // deletion. 116 // deletion.
113 protocol_handler_->Stop(); 117 protocol_handler_->Stop();
114 protocol_handler_ = NULL; 118 protocol_handler_ = NULL;
115 } 119 }
116 120
117 bool DevToolsServer::IsStarted() const { 121 bool DevToolsServer::IsStarted() const {
118 return protocol_handler_; 122 return protocol_handler_;
119 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698