| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/simple_web_view_dialog.h" | 5 #include "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 forward_->set_tag(IDC_FORWARD); | 186 forward_->set_tag(IDC_FORWARD); |
| 187 forward_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD)); | 187 forward_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD)); |
| 188 forward_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)); | 188 forward_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)); |
| 189 forward_->set_id(VIEW_ID_FORWARD_BUTTON); | 189 forward_->set_id(VIEW_ID_FORWARD_BUTTON); |
| 190 | 190 |
| 191 // Location bar. | 191 // Location bar. |
| 192 location_bar_ = new LocationBarView(NULL, profile_, command_updater_.get(), | 192 location_bar_ = new LocationBarView(NULL, profile_, command_updater_.get(), |
| 193 this, true); | 193 this, true); |
| 194 | 194 |
| 195 // Reload button. | 195 // Reload button. |
| 196 reload_ = new ReloadButton(command_updater_.get()); | 196 reload_ = new ReloadButton(profile_, command_updater_.get()); |
| 197 reload_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | | 197 reload_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | |
| 198 ui::EF_MIDDLE_MOUSE_BUTTON); | 198 ui::EF_MIDDLE_MOUSE_BUTTON); |
| 199 reload_->set_tag(IDC_RELOAD); | 199 reload_->set_tag(IDC_RELOAD); |
| 200 reload_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_RELOAD)); | 200 reload_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_RELOAD)); |
| 201 reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)); | 201 reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)); |
| 202 reload_->set_id(VIEW_ID_RELOAD_BUTTON); | 202 reload_->set_id(VIEW_ID_RELOAD_BUTTON); |
| 203 | 203 |
| 204 // Use separate view to setup custom background. | 204 // Use separate view to setup custom background. |
| 205 ToolbarRowView* toolbar_row = new ToolbarRowView; | 205 ToolbarRowView* toolbar_row = new ToolbarRowView; |
| 206 toolbar_row->Init(back_, forward_, reload_, location_bar_); | 206 toolbar_row->Init(back_, forward_, reload_, location_bar_); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 | 389 |
| 390 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { | 390 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { |
| 391 if (reload_) { | 391 if (reload_) { |
| 392 reload_->ChangeMode( | 392 reload_->ChangeMode( |
| 393 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, | 393 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, |
| 394 force); | 394 force); |
| 395 } | 395 } |
| 396 } | 396 } |
| 397 | 397 |
| 398 } // namespace chromeos | 398 } // namespace chromeos |
| OLD | NEW |