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

Side by Side Diff: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
OLDNEW
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/chromeos/sim_unlock_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 break; 437 break;
438 case CODE_PUK: 438 case CODE_PUK:
439 DCHECK(!new_pin_.empty()); 439 DCHECK(!new_pin_.empty());
440 lib->UnblockPin(code, new_pin_); 440 lib->UnblockPin(code, new_pin_);
441 break; 441 break;
442 } 442 }
443 } 443 }
444 444
445 void SimUnlockHandler::NotifyOnEnterPinEnded(bool cancelled) { 445 void SimUnlockHandler::NotifyOnEnterPinEnded(bool cancelled) {
446 NotificationService::current()->Notify( 446 NotificationService::current()->Notify(
447 NotificationType::ENTER_PIN_ENDED, 447 chrome::ENTER_PIN_ENDED,
448 NotificationService::AllSources(), 448 NotificationService::AllSources(),
449 Details<bool>(&cancelled)); 449 Details<bool>(&cancelled));
450 } 450 }
451 451
452 void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) { 452 void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) {
453 NotificationService::current()->Notify( 453 NotificationService::current()->Notify(
454 NotificationType::REQUIRE_PIN_SETTING_CHANGE_ENDED, 454 chrome::REQUIRE_PIN_SETTING_CHANGE_ENDED,
455 NotificationService::AllSources(), 455 NotificationService::AllSources(),
456 Details<bool>(&new_value)); 456 Details<bool>(&new_value));
457 } 457 }
458 458
459 void SimUnlockHandler::HandleCancel(const ListValue* args) { 459 void SimUnlockHandler::HandleCancel(const ListValue* args) {
460 const size_t kEnterCodeParamCount = 0; 460 const size_t kEnterCodeParamCount = 0;
461 if (args->GetSize() != kEnterCodeParamCount) { 461 if (args->GetSize() != kEnterCodeParamCount) {
462 NOTREACHED(); 462 NOTREACHED();
463 return; 463 return;
464 } 464 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 SimUnlockHandler* handler = new SimUnlockHandler(); 657 SimUnlockHandler* handler = new SimUnlockHandler();
658 AddMessageHandler((handler)->Attach(this)); 658 AddMessageHandler((handler)->Attach(this));
659 handler->Init(contents); 659 handler->Init(contents);
660 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); 660 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource();
661 661
662 // Set up the chrome://sim-unlock/ source. 662 // Set up the chrome://sim-unlock/ source.
663 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 663 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
664 } 664 }
665 665
666 } // namespace chromeos 666 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698