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/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 | 31 |
32 ProxySettingsDialog::ProxySettingsDialog(LoginHtmlDialog::Delegate* delegate, | 32 ProxySettingsDialog::ProxySettingsDialog(LoginHtmlDialog::Delegate* delegate, |
33 gfx::NativeWindow window) | 33 gfx::NativeWindow window) |
34 : LoginHtmlDialog( | 34 : LoginHtmlDialog( |
35 delegate, | 35 delegate, |
36 window, | 36 window, |
37 std::wstring(), | 37 std::wstring(), |
38 GURL(chrome::kChromeUIProxySettingsURL), | 38 GURL(chrome::kChromeUIProxySettingsURL)) { |
39 LoginHtmlDialog::STYLE_BUBBLE) { | |
40 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); | 39 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); |
41 SetDialogSize(CalculateSize(screen_bounds.width(), | 40 SetDialogSize(CalculateSize(screen_bounds.width(), |
42 kProxySettingsDialogReasonableWidth, | 41 kProxySettingsDialogReasonableWidth, |
43 kProxySettingsDialogReasonableWidthRatio), | 42 kProxySettingsDialogReasonableWidthRatio), |
44 CalculateSize(screen_bounds.height(), | 43 CalculateSize(screen_bounds.height(), |
45 kProxySettingsDialogReasonableHeight, | 44 kProxySettingsDialogReasonableHeight, |
46 kProxySettingsDialogReasonableHeightRatio)); | 45 kProxySettingsDialogReasonableHeightRatio)); |
47 } | 46 } |
48 | 47 |
49 void ProxySettingsDialog::OnDialogClosed(const std::string& json_retval) { | 48 void ProxySettingsDialog::OnDialogClosed(const std::string& json_retval) { |
50 LoginHtmlDialog::OnDialogClosed(json_retval); | 49 LoginHtmlDialog::OnDialogClosed(json_retval); |
51 content::NotificationService::current()->Notify( | 50 content::NotificationService::current()->Notify( |
52 chrome::NOTIFICATION_LOGIN_PROXY_CHANGED, | 51 chrome::NOTIFICATION_LOGIN_PROXY_CHANGED, |
53 content::NotificationService::AllSources(), | 52 content::NotificationService::AllSources(), |
54 content::NotificationService::NoDetails()); | 53 content::NotificationService::NoDetails()); |
55 } | 54 } |
56 | 55 |
57 } // namespace chromeos | 56 } // namespace chromeos |
OLD | NEW |