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/input/public/accelerator_manager.h" | 9 #include "athena/input/public/accelerator_manager.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 ui::Layer* layer = progress_bar_.get(); | 299 ui::Layer* layer = progress_bar_.get(); |
300 settings.AddObserver(new ui::ClosureAnimationObserver( | 300 settings.AddObserver(new ui::ClosureAnimationObserver( |
301 base::Bind(&base::DeletePointer<ui::Layer>, progress_bar_.release()))); | 301 base::Bind(&base::DeletePointer<ui::Layer>, progress_bar_.release()))); |
302 layer->SetOpacity(0.f); | 302 layer->SetOpacity(0.f); |
303 } | 303 } |
304 | 304 |
305 private: | 305 private: |
306 void CreateProgressBar() { | 306 void CreateProgressBar() { |
307 CHECK(!progress_bar_); | 307 CHECK(!progress_bar_); |
308 progress_bar_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); | 308 progress_bar_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); |
309 progress_bar_->SetColor(SkColorSetRGB(0x00, 0xb0, 0xc7)); | 309 progress_bar_->SetColor(SkColorSetRGB(0x17, 0x59, 0xcd)); |
310 } | 310 } |
311 | 311 |
312 scoped_ptr<WebActivityController> controller_; | 312 scoped_ptr<WebActivityController> controller_; |
313 | 313 |
314 // If the activity got evicted, this is the web content which holds the known | 314 // If the activity got evicted, this is the web content which holds the known |
315 // state of the content before eviction. | 315 // state of the content before eviction. |
316 scoped_ptr<content::WebContents> evicted_web_contents_; | 316 scoped_ptr<content::WebContents> evicted_web_contents_; |
317 | 317 |
318 scoped_ptr<ui::Layer> progress_bar_; | 318 scoped_ptr<ui::Layer> progress_bar_; |
319 | 319 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 void WebActivity::DidUpdateFaviconURL( | 466 void WebActivity::DidUpdateFaviconURL( |
467 const std::vector<content::FaviconURL>& candidates) { | 467 const std::vector<content::FaviconURL>& candidates) { |
468 ActivityManager::Get()->UpdateActivity(this); | 468 ActivityManager::Get()->UpdateActivity(this); |
469 } | 469 } |
470 | 470 |
471 void WebActivity::DidChangeThemeColor(SkColor theme_color) { | 471 void WebActivity::DidChangeThemeColor(SkColor theme_color) { |
472 title_color_ = theme_color; | 472 title_color_ = theme_color; |
473 } | 473 } |
474 | 474 |
475 } // namespace athena | 475 } // namespace athena |
OLD | NEW |