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/activity/public/activity_view.h" | 9 #include "athena/activity/public/activity_view.h" |
10 #include "athena/content/content_proxy.h" | 10 #include "athena/content/content_proxy.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 break; | 262 break; |
263 } | 263 } |
264 default: | 264 default: |
265 break; | 265 break; |
266 } | 266 } |
267 // nullptr is returned if the URL wasn't opened immediately. | 267 // nullptr is returned if the URL wasn't opened immediately. |
268 return nullptr; | 268 return nullptr; |
269 } | 269 } |
270 | 270 |
271 bool CanOverscrollContent() const override { | 271 bool CanOverscrollContent() const override { |
272 const std::string value = CommandLine::ForCurrentProcess()-> | 272 const std::string value = |
273 GetSwitchValueASCII(switches::kOverscrollHistoryNavigation); | 273 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 274 switches::kOverscrollHistoryNavigation); |
274 return value != "0"; | 275 return value != "0"; |
275 } | 276 } |
276 | 277 |
277 void OverscrollUpdate(float delta_y) override { | 278 void OverscrollUpdate(float delta_y) override { |
278 overscroll_y_ = delta_y; | 279 overscroll_y_ = delta_y; |
279 if (overscroll_y_ > kDistanceShowReloadMessage) { | 280 if (overscroll_y_ > kDistanceShowReloadMessage) { |
280 if (!reload_message_) | 281 if (!reload_message_) |
281 CreateReloadMessage(); | 282 CreateReloadMessage(); |
282 reload_message_->Show(); | 283 reload_message_->Show(); |
283 float opacity = 1.0f; | 284 float opacity = 1.0f; |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 if (content_proxy_.get()) | 652 if (content_proxy_.get()) |
652 content_proxy_.reset(nullptr); | 653 content_proxy_.reset(nullptr); |
653 } | 654 } |
654 | 655 |
655 void WebActivity::ShowContentProxy() { | 656 void WebActivity::ShowContentProxy() { |
656 if (!content_proxy_.get()) | 657 if (!content_proxy_.get()) |
657 content_proxy_.reset(new ContentProxy(web_view_)); | 658 content_proxy_.reset(new ContentProxy(web_view_)); |
658 } | 659 } |
659 | 660 |
660 } // namespace athena | 661 } // namespace athena |
OLD | NEW |