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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.cc

Issue 10540091: Rename gfx::Monitor to gfx::Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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/ui/webui/options2/chromeos/internet_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "chrome/common/chrome_switches.h" 47 #include "chrome/common/chrome_switches.h"
48 #include "chrome/common/time_format.h" 48 #include "chrome/common/time_format.h"
49 #include "content/public/browser/notification_service.h" 49 #include "content/public/browser/notification_service.h"
50 #include "content/public/browser/web_ui.h" 50 #include "content/public/browser/web_ui.h"
51 #include "grit/chromium_strings.h" 51 #include "grit/chromium_strings.h"
52 #include "grit/generated_resources.h" 52 #include "grit/generated_resources.h"
53 #include "grit/locale_settings.h" 53 #include "grit/locale_settings.h"
54 #include "grit/theme_resources.h" 54 #include "grit/theme_resources.h"
55 #include "ui/base/l10n/l10n_util.h" 55 #include "ui/base/l10n/l10n_util.h"
56 #include "ui/base/resource/resource_bundle.h" 56 #include "ui/base/resource/resource_bundle.h"
57 #include "ui/gfx/display.h"
57 #include "ui/gfx/image/image_skia.h" 58 #include "ui/gfx/image/image_skia.h"
58 #include "ui/gfx/monitor.h"
59 #include "ui/gfx/screen.h" 59 #include "ui/gfx/screen.h"
60 #include "ui/views/widget/widget.h" 60 #include "ui/views/widget/widget.h"
61 61
62 namespace { 62 namespace {
63 63
64 static const char kOtherNetworksFakePath[] = "?"; 64 static const char kOtherNetworksFakePath[] = "?";
65 65
66 // Keys for the network description dictionary passed to the web ui. Make sure 66 // Keys for the network description dictionary passed to the web ui. Make sure
67 // to keep the strings in sync with what the Javascript side uses. 67 // to keep the strings in sync with what the Javascript side uses.
68 const char kNetworkInfoKeyActivationState[] = "activation_state"; 68 const char kNetworkInfoKeyActivationState[] = "activation_state";
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 return browser->window()->GetNativeWindow(); 1130 return browser->window()->GetNativeWindow();
1131 } 1131 }
1132 1132
1133 Browser* InternetOptionsHandler::GetAppropriateBrowser() { 1133 Browser* InternetOptionsHandler::GetAppropriateBrowser() {
1134 return browser::FindOrCreateTabbedBrowser( 1134 return browser::FindOrCreateTabbedBrowser(
1135 ProfileManager::GetDefaultProfileOrOffTheRecord()); 1135 ProfileManager::GetDefaultProfileOrOffTheRecord());
1136 } 1136 }
1137 1137
1138 float InternetOptionsHandler::GetIconScaleFactor() { 1138 float InternetOptionsHandler::GetIconScaleFactor() {
1139 gfx::NativeWindow window = GetNativeWindow(); 1139 gfx::NativeWindow window = GetNativeWindow();
1140 gfx::Monitor monitor = gfx::Screen::GetMonitorNearestWindow(window); 1140 gfx::Display display = gfx::Screen::GetMonitorNearestWindow(window);
1141 return monitor.device_scale_factor(); 1141 return display.device_scale_factor();
1142 } 1142 }
1143 1143
1144 void InternetOptionsHandler::NetworkCommandCallback(const ListValue* args) { 1144 void InternetOptionsHandler::NetworkCommandCallback(const ListValue* args) {
1145 std::string str_type; 1145 std::string str_type;
1146 std::string service_path; 1146 std::string service_path;
1147 std::string command; 1147 std::string command;
1148 if (args->GetSize() != 3 || 1148 if (args->GetSize() != 3 ||
1149 !args->GetString(0, &str_type) || 1149 !args->GetString(0, &str_type) ||
1150 !args->GetString(1, &service_path) || 1150 !args->GetString(1, &service_path) ||
1151 !args->GetString(2, &command)) { 1151 !args->GetString(2, &command)) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 if (default_value) 1472 if (default_value)
1473 value_dict->Set("default", default_value->DeepCopy()); 1473 value_dict->Set("default", default_value->DeepCopy());
1474 if (ui_data.managed()) 1474 if (ui_data.managed())
1475 value_dict->SetString("controlledBy", "policy"); 1475 value_dict->SetString("controlledBy", "policy");
1476 else if (ui_data.recommended()) 1476 else if (ui_data.recommended())
1477 value_dict->SetString("controlledBy", "recommended"); 1477 value_dict->SetString("controlledBy", "recommended");
1478 settings->Set(key, value_dict); 1478 settings->Set(key, value_dict);
1479 } 1479 }
1480 1480
1481 } // namespace options2 1481 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698