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

Unified Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 23441060: DevTools: Improve design of WebViews available for inspection in chrome://inspect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/inspect/inspect.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/inspect_ui.cc
diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc
index fede447d8b7a9c3c921626b4b520e12521b13523..b1201876a92fd5941863dcfbe4aa4b46be3ec93c 100644
--- a/chrome/browser/ui/webui/inspect_ui.cc
+++ b/chrome/browser/ui/webui/inspect_ui.cc
@@ -105,6 +105,8 @@ static const char kAdbGlobalIdField[] = "adbGlobalId";
static const char kAdbBrowsersField[] = "browsers";
static const char kAdbPagesField[] = "pages";
static const char kAdbPortStatus[] = "adbPortStatus";
+static const char kAdbScreenWidthField[] = "adbScreenWidth";
+static const char kAdbScreenHeightField[] = "adbScreenHeight";
static const char kGuestList[] = "guests";
DictionaryValue* BuildTargetDescriptor(
@@ -709,6 +711,12 @@ void InspectUI::RemoteDevicesChanged(
browser->socket().c_str(),
page->id().c_str());
page_data->SetString(kAdbGlobalIdField, page_id);
+ // Pass the screen size in the page object to make sure that
+ // the caching logic does not prevent the page item from updating
+ // when the screen size changes.
+ gfx::Size screen_size = device->GetScreenSize();
+ page_data->SetInteger(kAdbScreenWidthField, screen_size.width());
+ page_data->SetInteger(kAdbScreenHeightField, screen_size.height());
remote_pages_[page_id] = page;
page_list->Append(page_data);
}
« no previous file with comments | « chrome/browser/resources/inspect/inspect.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698