| 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/login_html_dialog.h" | 5 #include "chrome/browser/chromeos/login/login_html_dialog.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" | 7 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" |
| 8 #include "chrome/browser/chromeos/frame/bubble_window.h" | 8 #include "chrome/browser/chromeos/frame/bubble_window.h" |
| 9 #include "chrome/browser/chromeos/login/helper.h" | 9 #include "chrome/browser/chromeos/login/helper.h" |
| 10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 /////////////////////////////////////////////////////////////////////////////// | 27 /////////////////////////////////////////////////////////////////////////////// |
| 28 // LoginHtmlDialog, public: | 28 // LoginHtmlDialog, public: |
| 29 | 29 |
| 30 LoginHtmlDialog::LoginHtmlDialog(Delegate* delegate, | 30 LoginHtmlDialog::LoginHtmlDialog(Delegate* delegate, |
| 31 gfx::NativeWindow parent_window, | 31 gfx::NativeWindow parent_window, |
| 32 const std::wstring& title, | 32 const std::wstring& title, |
| 33 const GURL& url, | 33 const GURL& url, |
| 34 Style style) | 34 Style style) |
| 35 : delegate_(delegate), | 35 : delegate_(delegate), |
| 36 parent_window_(parent_window), | 36 parent_window_(parent_window), |
| 37 title_(title), | 37 title_(WideToUTF16Hack(title)), |
| 38 url_(url), | 38 url_(url), |
| 39 style_(style), | 39 style_(style), |
| 40 bubble_frame_view_(NULL), | 40 bubble_frame_view_(NULL), |
| 41 is_open_(false) { | 41 is_open_(false) { |
| 42 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); | 42 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); |
| 43 width_ = static_cast<int>(kDefaultWidthRatio * screen_bounds.width()); | 43 width_ = static_cast<int>(kDefaultWidthRatio * screen_bounds.width()); |
| 44 height_ = static_cast<int>(kDefaultHeightRatio * screen_bounds.height()); | 44 height_ = static_cast<int>(kDefaultHeightRatio * screen_bounds.height()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 LoginHtmlDialog::~LoginHtmlDialog() { | 47 LoginHtmlDialog::~LoginHtmlDialog() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 77 height_ = height; | 77 height_ = height; |
| 78 } | 78 } |
| 79 | 79 |
| 80 /////////////////////////////////////////////////////////////////////////////// | 80 /////////////////////////////////////////////////////////////////////////////// |
| 81 // LoginHtmlDialog, protected: | 81 // LoginHtmlDialog, protected: |
| 82 | 82 |
| 83 bool LoginHtmlDialog::IsDialogModal() const { | 83 bool LoginHtmlDialog::IsDialogModal() const { |
| 84 return true; | 84 return true; |
| 85 } | 85 } |
| 86 | 86 |
| 87 std::wstring LoginHtmlDialog::GetDialogTitle() const { | 87 string16 LoginHtmlDialog::GetDialogTitle() const { |
| 88 return title_; | 88 return title_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 GURL LoginHtmlDialog::GetDialogContentURL() const { | 91 GURL LoginHtmlDialog::GetDialogContentURL() const { |
| 92 return url_; | 92 return url_; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void LoginHtmlDialog::GetWebUIMessageHandlers( | 95 void LoginHtmlDialog::GetWebUIMessageHandlers( |
| 96 std::vector<WebUIMessageHandler*>* handlers) const { | 96 std::vector<WebUIMessageHandler*>* handlers) const { |
| 97 } | 97 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 128 | 128 |
| 129 void LoginHtmlDialog::Observe(int type, | 129 void LoginHtmlDialog::Observe(int type, |
| 130 const NotificationSource& source, | 130 const NotificationSource& source, |
| 131 const NotificationDetails& details) { | 131 const NotificationDetails& details) { |
| 132 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); | 132 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); |
| 133 if (bubble_frame_view_) | 133 if (bubble_frame_view_) |
| 134 bubble_frame_view_->StopThrobber(); | 134 bubble_frame_view_->StopThrobber(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace chromeos | 137 } // namespace chromeos |
| OLD | NEW |