| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const int kInnerMargin = 2; | 50 const int kInnerMargin = 2; |
| 51 | 51 |
| 52 const SkColor kDialogColor = SK_ColorWHITE; | 52 const SkColor kDialogColor = SK_ColorWHITE; |
| 53 | 53 |
| 54 class ToolbarRowView : public views::View { | 54 class ToolbarRowView : public views::View { |
| 55 public: | 55 public: |
| 56 ToolbarRowView() { | 56 ToolbarRowView() { |
| 57 set_background(views::Background::CreateSolidBackground(kDialogColor)); | 57 set_background(views::Background::CreateSolidBackground(kDialogColor)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual ~ToolbarRowView() {} | 60 ~ToolbarRowView() override {} |
| 61 | 61 |
| 62 void Init(views::View* back, | 62 void Init(views::View* back, |
| 63 views::View* forward, | 63 views::View* forward, |
| 64 views::View* reload, | 64 views::View* reload, |
| 65 views::View* location_bar) { | 65 views::View* location_bar) { |
| 66 GridLayout* layout = new GridLayout(this); | 66 GridLayout* layout = new GridLayout(this); |
| 67 SetLayoutManager(layout); | 67 SetLayoutManager(layout); |
| 68 | 68 |
| 69 // Back button. | 69 // Back button. |
| 70 views::ColumnSet* column_set = layout->AddColumnSet(0); | 70 views::ColumnSet* column_set = layout->AddColumnSet(0); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace | 98 } // namespace |
| 99 | 99 |
| 100 namespace chromeos { | 100 namespace chromeos { |
| 101 | 101 |
| 102 // Stub implementation of ContentSettingBubbleModelDelegate. | 102 // Stub implementation of ContentSettingBubbleModelDelegate. |
| 103 class StubBubbleModelDelegate : public ContentSettingBubbleModelDelegate { | 103 class StubBubbleModelDelegate : public ContentSettingBubbleModelDelegate { |
| 104 public: | 104 public: |
| 105 StubBubbleModelDelegate() {} | 105 StubBubbleModelDelegate() {} |
| 106 virtual ~StubBubbleModelDelegate() {} | 106 ~StubBubbleModelDelegate() override {} |
| 107 | 107 |
| 108 // ContentSettingBubbleModelDelegate implementation: | 108 // ContentSettingBubbleModelDelegate implementation: |
| 109 virtual void ShowCollectedCookiesDialog( | 109 void ShowCollectedCookiesDialog(content::WebContents* web_contents) override { |
| 110 content::WebContents* web_contents) override { | |
| 111 } | 110 } |
| 112 | 111 |
| 113 virtual void ShowContentSettingsPage(ContentSettingsType type) override { | 112 void ShowContentSettingsPage(ContentSettingsType type) override {} |
| 114 } | |
| 115 | 113 |
| 116 virtual void ShowLearnMorePage(ContentSettingsType type) override { | 114 void ShowLearnMorePage(ContentSettingsType type) override {} |
| 117 } | |
| 118 | 115 |
| 119 private: | 116 private: |
| 120 DISALLOW_COPY_AND_ASSIGN(StubBubbleModelDelegate); | 117 DISALLOW_COPY_AND_ASSIGN(StubBubbleModelDelegate); |
| 121 }; | 118 }; |
| 122 | 119 |
| 123 // SimpleWebViewDialog class --------------------------------------------------- | 120 // SimpleWebViewDialog class --------------------------------------------------- |
| 124 | 121 |
| 125 SimpleWebViewDialog::SimpleWebViewDialog(Profile* profile) | 122 SimpleWebViewDialog::SimpleWebViewDialog(Profile* profile) |
| 126 : profile_(profile), | 123 : profile_(profile), |
| 127 back_(NULL), | 124 back_(NULL), |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 391 |
| 395 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { | 392 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { |
| 396 if (reload_) { | 393 if (reload_) { |
| 397 reload_->ChangeMode( | 394 reload_->ChangeMode( |
| 398 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, | 395 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, |
| 399 force); | 396 force); |
| 400 } | 397 } |
| 401 } | 398 } |
| 402 | 399 |
| 403 } // namespace chromeos | 400 } // namespace chromeos |
| OLD | NEW |