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

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

Issue 433083003: athena: Set a default background for the window title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/activity/activity_frame_view.cc ('k') | no next file » | 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 "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 return Activity::ACTIVITY_MEDIA_STATE_NONE; 342 return Activity::ACTIVITY_MEDIA_STATE_NONE;
343 } 343 }
344 344
345 void WebActivity::Init() { 345 void WebActivity::Init() {
346 DCHECK(web_view_); 346 DCHECK(web_view_);
347 web_view_->InstallAccelerators(); 347 web_view_->InstallAccelerators();
348 } 348 }
349 349
350 SkColor WebActivity::GetRepresentativeColor() const { 350 SkColor WebActivity::GetRepresentativeColor() const {
351 // TODO(sad): Compute the color from the favicon. 351 // TODO(sad): Compute the color from the favicon.
352 return SK_ColorGRAY; 352 return SK_ColorGRAY;
oshima 2014/08/01 17:32:58 maybe we should use something different if the web
sadrul 2014/08/01 18:01:07 Done (changed to a grayish-red).
353 } 353 }
354 354
355 base::string16 WebActivity::GetTitle() const { 355 base::string16 WebActivity::GetTitle() const {
356 return web_view_->GetWebContents()->GetTitle(); 356 return web_view_ ? web_view_->GetWebContents()->GetTitle() : base::string16();
357 } 357 }
358 358
359 bool WebActivity::UsesFrame() const { 359 bool WebActivity::UsesFrame() const {
360 return true; 360 return true;
361 } 361 }
362 362
363 views::View* WebActivity::GetContentsView() { 363 views::View* WebActivity::GetContentsView() {
364 if (!web_view_) { 364 if (!web_view_) {
365 web_view_ = new AthenaWebView(browser_context_); 365 web_view_ = new AthenaWebView(browser_context_);
366 web_view_->LoadInitialURL(url_); 366 web_view_->LoadInitialURL(url_);
(...skipping 16 matching lines...) Expand all
383 bool explicit_set) { 383 bool explicit_set) {
384 ActivityManager::Get()->UpdateActivity(this); 384 ActivityManager::Get()->UpdateActivity(this);
385 } 385 }
386 386
387 void WebActivity::DidUpdateFaviconURL( 387 void WebActivity::DidUpdateFaviconURL(
388 const std::vector<content::FaviconURL>& candidates) { 388 const std::vector<content::FaviconURL>& candidates) {
389 ActivityManager::Get()->UpdateActivity(this); 389 ActivityManager::Get()->UpdateActivity(this);
390 } 390 }
391 391
392 } // namespace athena 392 } // namespace athena
OLDNEW
« no previous file with comments | « athena/activity/activity_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698