Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/browser/chromeos/login/web_page_view.cc

Issue 3058006: Add API on host registration page. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: fixes Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h"
10 #include "base/string_util.h" 11 #include "base/string_util.h"
11 #include "base/time.h" 12 #include "base/time.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "chrome/browser/child_process_security_policy.h" 14 #include "chrome/browser/child_process_security_policy.h"
14 #include "chrome/browser/chromeos/login/helper.h" 15 #include "chrome/browser/chromeos/login/helper.h"
15 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 16 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
16 #include "chrome/browser/dom_ui/dom_ui.h" 17 #include "chrome/browser/dom_ui/dom_ui.h"
17 #include "chrome/browser/tab_contents/tab_contents.h" 18 #include "chrome/browser/tab_contents/tab_contents.h"
18 #include "chrome/common/bindings_policy.h" 19 #include "chrome/common/bindings_policy.h"
19 #include "gfx/canvas.h" 20 #include "gfx/canvas.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 : TabContents(profile, site_instance, MSG_ROUTING_NONE, NULL), 57 : TabContents(profile, site_instance, MSG_ROUTING_NONE, NULL),
57 page_delegate_(page_delegate) { 58 page_delegate_(page_delegate) {
58 } 59 }
59 60
60 void WizardWebPageViewTabContents::DidFailProvisionalLoadWithError( 61 void WizardWebPageViewTabContents::DidFailProvisionalLoadWithError(
61 RenderViewHost* render_view_host, 62 RenderViewHost* render_view_host,
62 bool is_main_frame, 63 bool is_main_frame,
63 int error_code, 64 int error_code,
64 const GURL& url, 65 const GURL& url,
65 bool showing_repost_interstitial) { 66 bool showing_repost_interstitial) {
67 LOG(ERROR) << "Page load failed. URL = " << url << ", error: " << error_code;
66 page_delegate_->OnPageLoadFailed(url.spec()); 68 page_delegate_->OnPageLoadFailed(url.spec());
67 } 69 }
68 70
69 void WizardWebPageViewTabContents::DidDisplayInsecureContent() { 71 void WizardWebPageViewTabContents::DidDisplayInsecureContent() {
70 page_delegate_->OnPageLoadFailed(""); 72 LOG(ERROR) << "Page load failed: did display insecure content";
73 page_delegate_->OnPageLoadFailed("Displayed insecure content");
71 } 74 }
72 75
73 void WizardWebPageViewTabContents::DidRunInsecureContent( 76 void WizardWebPageViewTabContents::DidRunInsecureContent(
74 const std::string& security_origin) { 77 const std::string& security_origin) {
78 LOG(ERROR) << "Page load failed: did run insecure content";
75 page_delegate_->OnPageLoadFailed(security_origin); 79 page_delegate_->OnPageLoadFailed(security_origin);
76 } 80 }
77 81
78 void WizardWebPageViewTabContents::DocumentLoadedInFrame() { 82 void WizardWebPageViewTabContents::DocumentLoadedInFrame() {
79 page_delegate_->OnPageLoaded(); 83 page_delegate_->OnPageLoaded();
80 } 84 }
81 85
82 void WizardWebPageViewTabContents::OnContentBlocked(ContentSettingsType type) { 86 void WizardWebPageViewTabContents::OnContentBlocked(ContentSettingsType type) {
87 LOG(ERROR) << "Page load failed: content blocked. Type: " << type;
83 page_delegate_->OnPageLoadFailed(""); 88 page_delegate_->OnPageLoadFailed("");
84 } 89 }
85 90
86 /////////////////////////////////////////////////////////////////////////////// 91 ///////////////////////////////////////////////////////////////////////////////
87 // WebPageDomView, public: 92 // WebPageDomView, public:
88 93
89 void WebPageDomView::SetTabContentsDelegate( 94 void WebPageDomView::SetTabContentsDelegate(
90 TabContentsDelegate* delegate) { 95 TabContentsDelegate* delegate) {
91 tab_contents_->set_delegate(delegate); 96 tab_contents_->set_delegate(delegate);
92 } 97 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 throbber_->GetPreferredSize().width(), 177 throbber_->GetPreferredSize().width(),
173 throbber_->GetPreferredSize().height()); 178 throbber_->GetPreferredSize().height());
174 connecting_label_->SetBounds( 179 connecting_label_->SetBounds(
175 width() / 2 - connecting_label_->GetPreferredSize().width() / 2, 180 width() / 2 - connecting_label_->GetPreferredSize().width() / 2,
176 y + throbber_->GetPreferredSize().height() + kSpacing, 181 y + throbber_->GetPreferredSize().height() + kSpacing,
177 connecting_label_->GetPreferredSize().width(), 182 connecting_label_->GetPreferredSize().width(),
178 connecting_label_->GetPreferredSize().height()); 183 connecting_label_->GetPreferredSize().height());
179 } 184 }
180 185
181 } // namespace chromeos 186 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/registration_screen.cc ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698