| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/webui/options/chromeos/about_page_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/about_page_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 virtual void UpdateStatusChanged(const UpdateLibrary::Status& status) { | 75 virtual void UpdateStatusChanged(const UpdateLibrary::Status& status) { |
| 76 page_handler_->UpdateStatus(status); | 76 page_handler_->UpdateStatus(status); |
| 77 } | 77 } |
| 78 | 78 |
| 79 AboutPageHandler* page_handler_; | 79 AboutPageHandler* page_handler_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(UpdateObserver); | 81 DISALLOW_COPY_AND_ASSIGN(UpdateObserver); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 AboutPageHandler::AboutPageHandler() | 84 AboutPageHandler::AboutPageHandler() |
| 85 : CrosOptionsPageUIHandler( | 85 : progress_(-1), |
| 86 new UserCrosSettingsProvider), | |
| 87 progress_(-1), | |
| 88 sticky_(false), | 86 sticky_(false), |
| 89 started_(false) | 87 started_(false) |
| 90 {} | 88 {} |
| 91 | 89 |
| 92 AboutPageHandler::~AboutPageHandler() { | 90 AboutPageHandler::~AboutPageHandler() { |
| 93 if (update_observer_.get()) { | 91 if (update_observer_.get()) { |
| 94 CrosLibrary::Get()->GetUpdateLibrary()-> | 92 CrosLibrary::Get()->GetUpdateLibrary()-> |
| 95 RemoveObserver(update_observer_.get()); | 93 RemoveObserver(update_observer_.get()); |
| 96 } | 94 } |
| 97 } | 95 } |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 if (CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { | 414 if (CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { |
| 417 // If UpdateLibrary still has the observer, then the page handler is valid. | 415 // If UpdateLibrary still has the observer, then the page handler is valid. |
| 418 AboutPageHandler* handler = observer->page_handler(); | 416 AboutPageHandler* handler = observer->page_handler(); |
| 419 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); | 417 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); |
| 420 handler->web_ui_->CallJavascriptFunction( | 418 handler->web_ui_->CallJavascriptFunction( |
| 421 "AboutPage.updateSelectedOptionCallback", *channel_string); | 419 "AboutPage.updateSelectedOptionCallback", *channel_string); |
| 422 } | 420 } |
| 423 } | 421 } |
| 424 | 422 |
| 425 } // namespace chromeos | 423 } // namespace chromeos |
| OLD | NEW |