| 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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 views::WebView* web_view_; | 116 views::WebView* web_view_; |
| 117 bool reserved_accelerator_enabled_; | 117 bool reserved_accelerator_enabled_; |
| 118 scoped_ptr<AcceleratorManager> accelerator_manager_; | 118 scoped_ptr<AcceleratorManager> accelerator_manager_; |
| 119 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 119 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(WebActivityController); | 121 DISALLOW_COPY_AND_ASSIGN(WebActivityController); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 const SkColor kDefaultTitleColor = SK_ColorGRAY; | 124 const SkColor kDefaultTitleColor = SkColorSetRGB(0xf2, 0xf2, 0xf2); |
| 125 const SkColor kDefaultUnavailableColor = SkColorSetRGB(0xbb, 0x77, 0x77); | 125 const SkColor kDefaultUnavailableColor = SkColorSetRGB(0xbb, 0x77, 0x77); |
| 126 | 126 |
| 127 } // namespace | 127 } // namespace |
| 128 | 128 |
| 129 // A web view for athena's web activity. Note that AthenaWebView will create its | 129 // A web view for athena's web activity. Note that AthenaWebView will create its |
| 130 // own content so that it can eject and reload it. | 130 // own content so that it can eject and reload it. |
| 131 class AthenaWebView : public views::WebView { | 131 class AthenaWebView : public views::WebView { |
| 132 public: | 132 public: |
| 133 AthenaWebView(content::BrowserContext* context) | 133 AthenaWebView(content::BrowserContext* context) |
| 134 : views::WebView(context), controller_(new WebActivityController(this)), | 134 : views::WebView(context), controller_(new WebActivityController(this)), |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 void WebActivity::DidUpdateFaviconURL( | 394 void WebActivity::DidUpdateFaviconURL( |
| 395 const std::vector<content::FaviconURL>& candidates) { | 395 const std::vector<content::FaviconURL>& candidates) { |
| 396 ActivityManager::Get()->UpdateActivity(this); | 396 ActivityManager::Get()->UpdateActivity(this); |
| 397 } | 397 } |
| 398 | 398 |
| 399 void WebActivity::DidChangeThemeColor(SkColor theme_color) { | 399 void WebActivity::DidChangeThemeColor(SkColor theme_color) { |
| 400 title_color_ = theme_color; | 400 title_color_ = theme_color; |
| 401 } | 401 } |
| 402 | 402 |
| 403 } // namespace athena | 403 } // namespace athena |
| OLD | NEW |