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/public/dialogs.h" | 9 #include "athena/content/public/dialogs.h" |
10 #include "athena/input/public/accelerator_manager.h" | 10 #include "athena/input/public/accelerator_manager.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 MakeInvisible(); | 465 MakeInvisible(); |
466 ReloadAndObserve(); | 466 ReloadAndObserve(); |
467 } else { | 467 } else { |
468 // If not previously specified, we change the state now to invisible.. | 468 // If not previously specified, we change the state now to invisible.. |
469 SetCurrentState(ACTIVITY_INVISIBLE); | 469 SetCurrentState(ACTIVITY_INVISIBLE); |
470 } | 470 } |
471 } | 471 } |
472 return web_view_; | 472 return web_view_; |
473 } | 473 } |
474 | 474 |
| 475 views::Widget* WebActivity::CreateWidget() { |
| 476 return NULL; // Use default widget. |
| 477 } |
| 478 |
475 void WebActivity::CreateOverviewModeImage() { | 479 void WebActivity::CreateOverviewModeImage() { |
476 // TODO(skuhne): Create an overview. | 480 // TODO(skuhne): Create an overview. |
477 } | 481 } |
478 | 482 |
479 gfx::ImageSkia WebActivity::GetOverviewModeImage() { | 483 gfx::ImageSkia WebActivity::GetOverviewModeImage() { |
480 return overview_mode_image_; | 484 return overview_mode_image_; |
481 } | 485 } |
482 | 486 |
483 void WebActivity::PrepareContentsForOverview() { | 487 void WebActivity::PrepareContentsForOverview() { |
484 // Turn on fast resizing to avoid re-laying out the web contents when | 488 // Turn on fast resizing to avoid re-laying out the web contents when |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 | 545 |
542 void WebActivity::ReloadAndObserve() { | 546 void WebActivity::ReloadAndObserve() { |
543 if (web_view_->IsContentEvicted()) { | 547 if (web_view_->IsContentEvicted()) { |
544 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); | 548 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); |
545 web_view_->ReloadContent(); | 549 web_view_->ReloadContent(); |
546 } | 550 } |
547 Observe(web_view_->GetWebContents()); | 551 Observe(web_view_->GetWebContents()); |
548 } | 552 } |
549 | 553 |
550 } // namespace athena | 554 } // namespace athena |
OLD | NEW |