| 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 "athena/content/web_activity.h" | 5 #include "athena/content/web_activity.h" |
| 6 | 6 |
| 7 #include "athena/activity/public/activity_factory.h" | 7 #include "athena/activity/public/activity_factory.h" |
| 8 #include "athena/activity/public/activity_manager.h" | 8 #include "athena/activity/public/activity_manager.h" |
| 9 #include "athena/content/content_proxy.h" | 9 #include "athena/content/content_proxy.h" |
| 10 #include "athena/content/media_utils.h" | 10 #include "athena/content/media_utils.h" |
| 11 #include "athena/content/public/dialogs.h" | 11 #include "athena/content/public/dialogs.h" |
| 12 #include "athena/content/web_activity_helpers.h" | 12 #include "athena/content/web_activity_helpers.h" |
| 13 #include "athena/input/public/accelerator_manager.h" | 13 #include "athena/input/public/accelerator_manager.h" |
| 14 #include "athena/strings/grit/athena_strings.h" | 14 #include "athena/strings/grit/athena_strings.h" |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "components/app_modal_dialogs/javascript_dialog_manager.h" |
| 18 #include "components/favicon_base/select_favicon_frames.h" | 19 #include "components/favicon_base/select_favicon_frames.h" |
| 19 #include "content/public/browser/native_web_keyboard_event.h" | 20 #include "content/public/browser/native_web_keyboard_event.h" |
| 20 #include "content/public/browser/navigation_controller.h" | 21 #include "content/public/browser/navigation_controller.h" |
| 21 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/browser/web_contents_delegate.h" | 23 #include "content/public/browser/web_contents_delegate.h" |
| 23 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
| 24 #include "content/public/common/favicon_url.h" | 25 #include "content/public/common/favicon_url.h" |
| 25 #include "ui/aura/window.h" | 26 #include "ui/aura/window.h" |
| 26 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 27 #include "ui/compositor/closure_animation_observer.h" | 28 #include "ui/compositor/closure_animation_observer.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 358 |
| 358 ui::ScopedLayerAnimationSettings settings(progress_bar_->GetAnimator()); | 359 ui::ScopedLayerAnimationSettings settings(progress_bar_->GetAnimator()); |
| 359 settings.SetTweenType(gfx::Tween::EASE_IN); | 360 settings.SetTweenType(gfx::Tween::EASE_IN); |
| 360 ui::Layer* layer = progress_bar_.get(); | 361 ui::Layer* layer = progress_bar_.get(); |
| 361 settings.AddObserver(new ui::ClosureAnimationObserver( | 362 settings.AddObserver(new ui::ClosureAnimationObserver( |
| 362 base::Bind(&base::DeletePointer<ui::Layer>, progress_bar_.release()))); | 363 base::Bind(&base::DeletePointer<ui::Layer>, progress_bar_.release()))); |
| 363 layer->SetOpacity(0.f); | 364 layer->SetOpacity(0.f); |
| 364 } | 365 } |
| 365 | 366 |
| 366 content::JavaScriptDialogManager* GetJavaScriptDialogManager() override { | 367 content::JavaScriptDialogManager* GetJavaScriptDialogManager() override { |
| 367 NOTIMPLEMENTED(); | 368 return GetJavaScriptDialogManagerInstance(); |
| 368 return nullptr; | |
| 369 } | 369 } |
| 370 | 370 |
| 371 content::ColorChooser* OpenColorChooser( | 371 content::ColorChooser* OpenColorChooser( |
| 372 content::WebContents* web_contents, | 372 content::WebContents* web_contents, |
| 373 SkColor color, | 373 SkColor color, |
| 374 const std::vector<content::ColorSuggestion>& suggestions) override { | 374 const std::vector<content::ColorSuggestion>& suggestions) override { |
| 375 return athena::OpenColorChooser(web_contents, color, suggestions); | 375 return athena::OpenColorChooser(web_contents, color, suggestions); |
| 376 } | 376 } |
| 377 | 377 |
| 378 // Called when a file selection is to be done. | 378 // Called when a file selection is to be done. |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 if (content_proxy_.get()) | 644 if (content_proxy_.get()) |
| 645 content_proxy_.reset(nullptr); | 645 content_proxy_.reset(nullptr); |
| 646 } | 646 } |
| 647 | 647 |
| 648 void WebActivity::ShowContentProxy() { | 648 void WebActivity::ShowContentProxy() { |
| 649 if (!content_proxy_.get()) | 649 if (!content_proxy_.get()) |
| 650 content_proxy_.reset(new ContentProxy(web_view_)); | 650 content_proxy_.reset(new ContentProxy(web_view_)); |
| 651 } | 651 } |
| 652 | 652 |
| 653 } // namespace athena | 653 } // namespace athena |
| OLD | NEW |