| 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/web_page_view.h" | 5 #include "chrome/browser/chromeos/login/web_page_view.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/chromeos/login/helper.h" | 12 #include "chrome/browser/chromeos/login/helper.h" |
| 13 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 13 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "content/browser/child_process_security_policy.h" | 15 #include "content/browser/child_process_security_policy.h" |
| 16 #include "content/browser/tab_contents/tab_contents.h" | |
| 17 #include "content/browser/webui/web_ui.h" | 16 #include "content/browser/webui/web_ui.h" |
| 17 #include "content/public/browser/web_contents.h" |
| 18 #include "content/public/common/bindings_policy.h" | 18 #include "content/public/common/bindings_policy.h" |
| 19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 20 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 21 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
| 22 #include "third_party/skia/include/core/SkColor.h" | 22 #include "third_party/skia/include/core/SkColor.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
| 25 #include "ui/gfx/canvas.h" | 25 #include "ui/gfx/canvas.h" |
| 26 #include "ui/views/background.h" | 26 #include "ui/views/background.h" |
| 27 #include "ui/views/border.h" | 27 #include "ui/views/border.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void WizardWebPageViewTabContents::DocumentLoadedInFrame( | 82 void WizardWebPageViewTabContents::DocumentLoadedInFrame( |
| 83 long long /*frame_id*/) { | 83 long long /*frame_id*/) { |
| 84 page_delegate_->OnPageLoaded(); | 84 page_delegate_->OnPageLoaded(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 /////////////////////////////////////////////////////////////////////////////// | 87 /////////////////////////////////////////////////////////////////////////////// |
| 88 // WebPageDomView, public: | 88 // WebPageDomView, public: |
| 89 | 89 |
| 90 void WebPageDomView::SetWebContentsDelegate( | 90 void WebPageDomView::SetWebContentsDelegate( |
| 91 content::WebContentsDelegate* delegate) { | 91 content::WebContentsDelegate* delegate) { |
| 92 dom_contents_->tab_contents()->SetDelegate(delegate); | 92 dom_contents_->web_contents()->SetDelegate(delegate); |
| 93 } | 93 } |
| 94 | 94 |
| 95 /////////////////////////////////////////////////////////////////////////////// | 95 /////////////////////////////////////////////////////////////////////////////// |
| 96 // WebPageView, public: | 96 // WebPageView, public: |
| 97 | 97 |
| 98 WebPageView::WebPageView() : throbber_(NULL), connecting_label_(NULL) {} | 98 WebPageView::WebPageView() : throbber_(NULL), connecting_label_(NULL) {} |
| 99 | 99 |
| 100 WebPageView::~WebPageView() {} | 100 WebPageView::~WebPageView() {} |
| 101 | 101 |
| 102 void WebPageView::Init() { | 102 void WebPageView::Init() { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 throbber_->GetPreferredSize().width(), | 180 throbber_->GetPreferredSize().width(), |
| 181 throbber_->GetPreferredSize().height()); | 181 throbber_->GetPreferredSize().height()); |
| 182 connecting_label_->SetBounds( | 182 connecting_label_->SetBounds( |
| 183 width() / 2 - connecting_label_->GetPreferredSize().width() / 2, | 183 width() / 2 - connecting_label_->GetPreferredSize().width() / 2, |
| 184 y + throbber_->GetPreferredSize().height() + kSpacing, | 184 y + throbber_->GetPreferredSize().height() + kSpacing, |
| 185 connecting_label_->GetPreferredSize().width(), | 185 connecting_label_->GetPreferredSize().width(), |
| 186 connecting_label_->GetPreferredSize().height()); | 186 connecting_label_->GetPreferredSize().height()); |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace chromeos | 189 } // namespace chromeos |
| OLD | NEW |