OLD | NEW |
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/chromeos/login/help_app_launcher.h" | 5 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 /////////////////////////////////////////////////////////////////////////////// | 56 /////////////////////////////////////////////////////////////////////////////// |
57 // HelpApp, protected: | 57 // HelpApp, protected: |
58 | 58 |
59 HelpAppLauncher::~HelpAppLauncher() {} | 59 HelpAppLauncher::~HelpAppLauncher() {} |
60 | 60 |
61 /////////////////////////////////////////////////////////////////////////////// | 61 /////////////////////////////////////////////////////////////////////////////// |
62 // HelpApp, private: | 62 // HelpApp, private: |
63 | 63 |
64 void HelpAppLauncher::ShowHelpTopicDialog(Profile* profile, | 64 void HelpAppLauncher::ShowHelpTopicDialog(Profile* profile, |
65 const GURL& topic_url) { | 65 const GURL& topic_url) { |
66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 66 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
67 LoginWebDialog* dialog = new LoginWebDialog( | 67 LoginWebDialog* dialog = new LoginWebDialog( |
68 profile, | 68 profile, |
69 NULL, | 69 NULL, |
70 parent_window_, | 70 parent_window_, |
71 l10n_util::GetStringUTF16(IDS_LOGIN_OOBE_HELP_DIALOG_TITLE), | 71 l10n_util::GetStringUTF16(IDS_LOGIN_OOBE_HELP_DIALOG_TITLE), |
72 topic_url); | 72 topic_url); |
73 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); | 73 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); |
74 dialog->SetDialogSize(l10n_util::GetLocalizedContentsWidthInPixels( | 74 dialog->SetDialogSize(l10n_util::GetLocalizedContentsWidthInPixels( |
75 IDS_HELP_APP_DIALOG_WIDTH_PIXELS), | 75 IDS_HELP_APP_DIALOG_WIDTH_PIXELS), |
76 l10n_util::GetLocalizedContentsWidthInPixels( | 76 l10n_util::GetLocalizedContentsWidthInPixels( |
77 IDS_HELP_APP_DIALOG_HEIGHT_PIXELS)); | 77 IDS_HELP_APP_DIALOG_HEIGHT_PIXELS)); |
78 dialog->Show(); | 78 dialog->Show(); |
79 // The dialog object will be deleted on dialog close. | 79 // The dialog object will be deleted on dialog close. |
80 } | 80 } |
81 | 81 |
82 } // namespace chromeos | 82 } // namespace chromeos |
OLD | NEW |