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

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

Issue 477523002: Athena: Adding basic resource management framework (un-/re-loading) of V2 applications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Aaaand another rebase. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « athena/content/web_activity.h ('k') | athena/main/athena_launcher.cc » ('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/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/input/public/accelerator_manager.h" 9 #include "athena/input/public/accelerator_manager.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return web_view_ && web_view_->IsDrawn(); 340 return web_view_ && web_view_->IsDrawn();
341 } 341 }
342 342
343 Activity::ActivityMediaState WebActivity::GetMediaState() { 343 Activity::ActivityMediaState WebActivity::GetMediaState() {
344 // TODO(skuhne): The function GetTabMediaStateForContents(WebContents), 344 // TODO(skuhne): The function GetTabMediaStateForContents(WebContents),
345 // and the AudioStreamMonitor needs to be moved from Chrome into contents to 345 // and the AudioStreamMonitor needs to be moved from Chrome into contents to
346 // make it more modular and so that we can use it from here. 346 // make it more modular and so that we can use it from here.
347 return Activity::ACTIVITY_MEDIA_STATE_NONE; 347 return Activity::ACTIVITY_MEDIA_STATE_NONE;
348 } 348 }
349 349
350 aura::Window* WebActivity::GetWindow() {
351 return !web_view_ ? NULL : web_view_->GetWidget()->GetNativeWindow();
352 }
353
350 void WebActivity::Init() { 354 void WebActivity::Init() {
351 DCHECK(web_view_); 355 DCHECK(web_view_);
352 web_view_->InstallAccelerators(); 356 web_view_->InstallAccelerators();
353 } 357 }
354 358
355 SkColor WebActivity::GetRepresentativeColor() const { 359 SkColor WebActivity::GetRepresentativeColor() const {
356 // TODO(sad): Compute the color from the favicon. 360 // TODO(sad): Compute the color from the favicon.
357 return web_view_ ? title_color_ : kDefaultUnavailableColor; 361 return web_view_ ? title_color_ : kDefaultUnavailableColor;
358 } 362 }
359 363
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 void WebActivity::DidUpdateFaviconURL( 398 void WebActivity::DidUpdateFaviconURL(
395 const std::vector<content::FaviconURL>& candidates) { 399 const std::vector<content::FaviconURL>& candidates) {
396 ActivityManager::Get()->UpdateActivity(this); 400 ActivityManager::Get()->UpdateActivity(this);
397 } 401 }
398 402
399 void WebActivity::DidChangeThemeColor(SkColor theme_color) { 403 void WebActivity::DidChangeThemeColor(SkColor theme_color) {
400 title_color_ = theme_color; 404 title_color_ = theme_color;
401 } 405 }
402 406
403 } // namespace athena 407 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/web_activity.h ('k') | athena/main/athena_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698