| 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/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "components/toolbar/toolbar_model_impl.h" | 28 #include "components/toolbar/toolbar_model_impl.h" |
| 29 #include "content/public/browser/navigation_controller.h" | 29 #include "content/public/browser/navigation_controller.h" |
| 30 #include "content/public/browser/navigation_entry.h" | 30 #include "content/public/browser/navigation_entry.h" |
| 31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/common/content_constants.h" | 32 #include "content/public/common/content_constants.h" |
| 33 #include "grit/components_strings.h" | 33 #include "grit/components_strings.h" |
| 34 #include "ipc/ipc_message.h" | 34 #include "ipc/ipc_message.h" |
| 35 #include "ui/base/l10n/l10n_util.h" | 35 #include "ui/base/l10n/l10n_util.h" |
| 36 #include "ui/base/theme_provider.h" | 36 #include "ui/base/theme_provider.h" |
| 37 #include "ui/views/background.h" | 37 #include "ui/views/background.h" |
| 38 #include "ui/views/bubble/bubble_delegate.h" | |
| 39 #include "ui/views/controls/webview/webview.h" | 38 #include "ui/views/controls/webview/webview.h" |
| 40 #include "ui/views/layout/grid_layout.h" | 39 #include "ui/views/layout/grid_layout.h" |
| 41 #include "ui/views/layout/layout_constants.h" | 40 #include "ui/views/layout/layout_constants.h" |
| 42 #include "ui/views/view.h" | 41 #include "ui/views/view.h" |
| 43 #include "ui/views/widget/widget.h" | 42 #include "ui/views/widget/widget.h" |
| 44 | 43 |
| 45 using content::WebContents; | 44 using content::WebContents; |
| 46 using views::GridLayout; | 45 using views::GridLayout; |
| 47 | 46 |
| 48 namespace { | 47 namespace { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 289 } |
| 291 | 290 |
| 292 ToolbarModel* SimpleWebViewDialog::GetToolbarModel() { | 291 ToolbarModel* SimpleWebViewDialog::GetToolbarModel() { |
| 293 return toolbar_model_.get(); | 292 return toolbar_model_.get(); |
| 294 } | 293 } |
| 295 | 294 |
| 296 const ToolbarModel* SimpleWebViewDialog::GetToolbarModel() const { | 295 const ToolbarModel* SimpleWebViewDialog::GetToolbarModel() const { |
| 297 return toolbar_model_.get(); | 296 return toolbar_model_.get(); |
| 298 } | 297 } |
| 299 | 298 |
| 300 views::Widget* SimpleWebViewDialog::CreateViewsBubble( | |
| 301 views::BubbleDelegateView* bubble_delegate) { | |
| 302 return views::BubbleDelegateView::CreateBubble(bubble_delegate); | |
| 303 } | |
| 304 | |
| 305 ContentSettingBubbleModelDelegate* | 299 ContentSettingBubbleModelDelegate* |
| 306 SimpleWebViewDialog::GetContentSettingBubbleModelDelegate() { | 300 SimpleWebViewDialog::GetContentSettingBubbleModelDelegate() { |
| 307 return bubble_model_delegate_.get(); | 301 return bubble_model_delegate_.get(); |
| 308 } | 302 } |
| 309 | 303 |
| 310 void SimpleWebViewDialog::ShowWebsiteSettings( | 304 void SimpleWebViewDialog::ShowWebsiteSettings( |
| 311 content::WebContents* web_contents, | 305 content::WebContents* web_contents, |
| 312 const GURL& url, | 306 const GURL& url, |
| 313 const security_state::SecurityStateModel::SecurityInfo& security_info) { | 307 const security_state::SecurityStateModel::SecurityInfo& security_info) { |
| 314 NOTIMPLEMENTED(); | 308 NOTIMPLEMENTED(); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 387 |
| 394 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { | 388 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { |
| 395 if (reload_) { | 389 if (reload_) { |
| 396 reload_->ChangeMode( | 390 reload_->ChangeMode( |
| 397 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, | 391 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, |
| 398 force); | 392 force); |
| 399 } | 393 } |
| 400 } | 394 } |
| 401 | 395 |
| 402 } // namespace chromeos | 396 } // namespace chromeos |
| OLD | NEW |