Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: athena/content/app_activity.cc

Issue 518673007: Make activities have a thick border when in overview mode part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_overview2
Patch Set: Rebased Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « athena/content/app_activity.h ('k') | athena/content/app_activity_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « athena/content/app_activity.h ('k') | athena/content/app_activity_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698