OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/proxy_settings_dialog.h" | 5 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/login/helper.h" | 7 #include "chrome/browser/chromeos/login/helper.h" |
8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
10 #include "content/common/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
12 #include "ui/gfx/size.h" | 12 #include "ui/gfx/size.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Hints for size of proxy settings dialog. | 16 // Hints for size of proxy settings dialog. |
17 const int kProxySettingsDialogReasonableWidth = 750; | 17 const int kProxySettingsDialogReasonableWidth = 750; |
18 const int kProxySettingsDialogReasonableHeight = 550; | 18 const int kProxySettingsDialogReasonableHeight = 550; |
19 const float kProxySettingsDialogReasonableWidthRatio = 0.4f; | 19 const float kProxySettingsDialogReasonableWidthRatio = 0.4f; |
20 const float kProxySettingsDialogReasonableHeightRatio = 0.4f; | 20 const float kProxySettingsDialogReasonableHeightRatio = 0.4f; |
(...skipping 20 matching lines...) Expand all Loading... |
41 SetDialogSize(CalculateSize(screen_bounds.width(), | 41 SetDialogSize(CalculateSize(screen_bounds.width(), |
42 kProxySettingsDialogReasonableWidth, | 42 kProxySettingsDialogReasonableWidth, |
43 kProxySettingsDialogReasonableWidthRatio), | 43 kProxySettingsDialogReasonableWidthRatio), |
44 CalculateSize(screen_bounds.height(), | 44 CalculateSize(screen_bounds.height(), |
45 kProxySettingsDialogReasonableHeight, | 45 kProxySettingsDialogReasonableHeight, |
46 kProxySettingsDialogReasonableHeightRatio)); | 46 kProxySettingsDialogReasonableHeightRatio)); |
47 } | 47 } |
48 | 48 |
49 void ProxySettingsDialog::OnDialogClosed(const std::string& json_retval) { | 49 void ProxySettingsDialog::OnDialogClosed(const std::string& json_retval) { |
50 LoginHtmlDialog::OnDialogClosed(json_retval); | 50 LoginHtmlDialog::OnDialogClosed(json_retval); |
51 NotificationService::current()->Notify( | 51 content::NotificationService::current()->Notify( |
52 chrome::NOTIFICATION_LOGIN_PROXY_CHANGED, | 52 chrome::NOTIFICATION_LOGIN_PROXY_CHANGED, |
53 NotificationService::AllSources(), | 53 content::NotificationService::AllSources(), |
54 NotificationService::NoDetails()); | 54 content::NotificationService::NoDetails()); |
55 } | 55 } |
56 | 56 |
57 } // namespace chromeos | 57 } // namespace chromeos |
OLD | NEW |