| 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/app_activity.h" | 5 #include "athena/content/app_activity.h" |
| 6 | 6 |
| 7 #include "athena/activity/public/activity_manager.h" | 7 #include "athena/activity/public/activity_manager.h" |
| 8 #include "athena/content/app_activity_registry.h" | 8 #include "athena/content/app_activity_registry.h" |
| 9 #include "athena/content/public/app_registry.h" | 9 #include "athena/content/public/app_registry.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 133 } |
| 134 | 134 |
| 135 void AppActivity::CreateOverviewModeImage() { | 135 void AppActivity::CreateOverviewModeImage() { |
| 136 // TODO(skuhne): Implement this! | 136 // TODO(skuhne): Implement this! |
| 137 } | 137 } |
| 138 | 138 |
| 139 gfx::ImageSkia AppActivity::GetOverviewModeImage() { | 139 gfx::ImageSkia AppActivity::GetOverviewModeImage() { |
| 140 return overview_mode_image_; | 140 return overview_mode_image_; |
| 141 } | 141 } |
| 142 | 142 |
| 143 void AppActivity::PrepareContentsForOverview() { |
| 144 // Turn on fast resizing to avoid re-laying out the web contents when |
| 145 // entering / exiting overview mode. |
| 146 web_view_->SetFastResize(true); |
| 147 } |
| 148 |
| 149 void AppActivity::ResetContentsView() { |
| 150 web_view_->SetFastResize(false); |
| 151 web_view_->Layout(); |
| 152 } |
| 153 |
| 143 AppActivity::~AppActivity() { | 154 AppActivity::~AppActivity() { |
| 144 // If this activity is registered, we unregister it now. | 155 // If this activity is registered, we unregister it now. |
| 145 if (app_activity_registry_) | 156 if (app_activity_registry_) |
| 146 app_activity_registry_->UnregisterAppActivity(this); | 157 app_activity_registry_->UnregisterAppActivity(this); |
| 147 } | 158 } |
| 148 | 159 |
| 149 void AppActivity::TitleWasSet(content::NavigationEntry* entry, | 160 void AppActivity::TitleWasSet(content::NavigationEntry* entry, |
| 150 bool explicit_set) { | 161 bool explicit_set) { |
| 151 ActivityManager::Get()->UpdateActivity(this); | 162 ActivityManager::Get()->UpdateActivity(this); |
| 152 } | 163 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 overview_mode_image_ = gfx::ImageSkia(); | 209 overview_mode_image_ = gfx::ImageSkia(); |
| 199 } | 210 } |
| 200 // Now we can hide this. | 211 // Now we can hide this. |
| 201 // Note: This might have to be done asynchronously after the readback took | 212 // Note: This might have to be done asynchronously after the readback took |
| 202 // place. | 213 // place. |
| 203 web_view_->SetVisible(false); | 214 web_view_->SetVisible(false); |
| 204 web_view_->GetWebContents()->GetNativeView()->Hide(); | 215 web_view_->GetWebContents()->GetNativeView()->Hide(); |
| 205 } | 216 } |
| 206 | 217 |
| 207 } // namespace athena | 218 } // namespace athena |
| OLD | NEW |