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

Side by Side Diff: android_webview/native/aw_dev_tools_server.cc

Issue 349653004: Merge 279934 "aw: Fix hardware teardown race" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 6 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
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "android_webview/native/aw_dev_tools_server.h" 5 #include "android_webview/native/aw_dev_tools_server.h"
6 6
7 #include "android_webview/native/aw_contents.h" 7 #include "android_webview/native/aw_contents.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 "</html>"; 137 "</html>";
138 return html; 138 return html;
139 } 139 }
140 140
141 std::string GetViewDescription(WebContents* web_contents) { 141 std::string GetViewDescription(WebContents* web_contents) {
142 const android_webview::BrowserViewRenderer* bvr = 142 const android_webview::BrowserViewRenderer* bvr =
143 android_webview::AwContents::FromWebContents(web_contents) 143 android_webview::AwContents::FromWebContents(web_contents)
144 ->GetBrowserViewRenderer(); 144 ->GetBrowserViewRenderer();
145 if (!bvr) return ""; 145 if (!bvr) return "";
146 base::DictionaryValue description; 146 base::DictionaryValue description;
147 description.SetBoolean("attached", bvr->IsAttachedToWindow()); 147 description.SetBoolean("attached", bvr->attached_to_window());
148 description.SetBoolean("visible", bvr->IsVisible()); 148 description.SetBoolean("visible", bvr->IsVisible());
149 gfx::Rect screen_rect = bvr->GetScreenRect(); 149 gfx::Rect screen_rect = bvr->GetScreenRect();
150 description.SetInteger("screenX", screen_rect.x()); 150 description.SetInteger("screenX", screen_rect.x());
151 description.SetInteger("screenY", screen_rect.y()); 151 description.SetInteger("screenY", screen_rect.y());
152 description.SetBoolean("empty", screen_rect.size().IsEmpty()); 152 description.SetBoolean("empty", screen_rect.size().IsEmpty());
153 if (!screen_rect.size().IsEmpty()) { 153 if (!screen_rect.size().IsEmpty()) {
154 description.SetInteger("width", screen_rect.width()); 154 description.SetInteger("width", screen_rect.width());
155 description.SetInteger("height", screen_rect.height()); 155 description.SetInteger("height", screen_rect.height());
156 } 156 }
157 std::string json; 157 std::string json;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 AwDevToolsServer* devtools_server = 219 AwDevToolsServer* devtools_server =
220 reinterpret_cast<AwDevToolsServer*>(server); 220 reinterpret_cast<AwDevToolsServer*>(server);
221 if (enabled) { 221 if (enabled) {
222 devtools_server->Start(); 222 devtools_server->Start();
223 } else { 223 } else {
224 devtools_server->Stop(); 224 devtools_server->Stop();
225 } 225 }
226 } 226 }
227 227
228 } // namespace android_webview 228 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698