diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-12 19:38:30 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-12 19:38:30 +0000 |
commit | 0e0e4ca9eaaa5a6481dda0881d1f27c751ba3132 (patch) | |
tree | 092b96aae63a5012501c57cdc6f4ea87fb013f94 /chrome/browser | |
parent | 121df062af2f6ba93a7cccceee6ee43ce0279884 (diff) | |
download | chromium_src-0e0e4ca9eaaa5a6481dda0881d1f27c751ba3132.zip chromium_src-0e0e4ca9eaaa5a6481dda0881d1f27c751ba3132.tar.gz chromium_src-0e0e4ca9eaaa5a6481dda0881d1f27c751ba3132.tar.bz2 |
WebUI: Change more entries from DOMUI to WebUI under chromeos/notifications directory.
BUG=59945
TEST=trybots
Review URL: http://codereview.chromium.org/6473013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
6 files changed, 19 insertions, 19 deletions
diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc index 16d04ff..aa05c8c 100644 --- a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc +++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -49,7 +49,7 @@ void BalloonCollectionImpl::Add(const Notification& notification, space_change_listener_->OnBalloonSpaceChanged(); } -bool BalloonCollectionImpl::AddDOMUIMessageCallback( +bool BalloonCollectionImpl::AddWebUIMessageCallback( const Notification& notification, const std::string& message, MessageCallback* callback) { @@ -60,7 +60,7 @@ bool BalloonCollectionImpl::AddDOMUIMessageCallback( } BalloonViewHost* host = static_cast<BalloonViewHost*>(balloon->view()->GetHost()); - return host->AddDOMUIMessageCallback(message, callback); + return host->AddWebUIMessageCallback(message, callback); } void BalloonCollectionImpl::AddSystemNotification( diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.h b/chrome/browser/chromeos/notifications/balloon_collection_impl.h index b93265a..a837282 100644 --- a/chrome/browser/chromeos/notifications/balloon_collection_impl.h +++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.h @@ -81,7 +81,7 @@ class BalloonCollectionImpl : public BalloonCollection, // there is no notification that matches NotificationDelegate::id(), // or a callback for given message already exists. The callback // object is owned and deleted by callee. - bool AddDOMUIMessageCallback(const Notification& notification, + bool AddWebUIMessageCallback(const Notification& notification, const std::string& message, MessageCallback* callback); diff --git a/chrome/browser/chromeos/notifications/balloon_view_host.cc b/chrome/browser/chromeos/notifications/balloon_view_host.cc index 4754400..ff4c50e 100644 --- a/chrome/browser/chromeos/notifications/balloon_view_host.cc +++ b/chrome/browser/chromeos/notifications/balloon_view_host.cc @@ -16,7 +16,7 @@ BalloonViewHost::~BalloonViewHost() { message_callbacks_.end()); } -bool BalloonViewHost::AddDOMUIMessageCallback( +bool BalloonViewHost::AddWebUIMessageCallback( const std::string& message, MessageCallback* callback) { std::pair<MessageCallbackMap::iterator, bool> ret; diff --git a/chrome/browser/chromeos/notifications/balloon_view_host.h b/chrome/browser/chromeos/notifications/balloon_view_host.h index c0698db..db532b7 100644 --- a/chrome/browser/chromeos/notifications/balloon_view_host.h +++ b/chrome/browser/chromeos/notifications/balloon_view_host.h @@ -30,7 +30,7 @@ class BalloonViewHost : public ::BalloonViewHost { // is succssfully registered, or false otherwise. It fails to add if // a callback for given message already exists. The callback object // is owned and deleted by callee. - bool AddDOMUIMessageCallback(const std::string& message, + bool AddWebUIMessageCallback(const std::string& message, MessageCallback* callback); // Process WebUI message. diff --git a/chrome/browser/chromeos/notifications/notification_browsertest.cc b/chrome/browser/chromeos/notifications/notification_browsertest.cc index 2f69b8a..49d77b8 100644 --- a/chrome/browser/chromeos/notifications/notification_browsertest.cc +++ b/chrome/browser/chromeos/notifications/notification_browsertest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -40,7 +40,7 @@ class NotificationTest : public InProcessBrowserTest, expected_(PanelController::INITIAL) { } - void HandleDOMUIMessage(const ListValue* value) { + void HandleWebUIMessage(const ListValue* value) { MessageLoop::current()->Quit(); } @@ -538,38 +538,38 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestCloseDismissAllNonSticky) { EXPECT_EQ(1, tester->GetStickyNotificationCount()); } -IN_PROC_BROWSER_TEST_F(NotificationTest, TestAddDOMUIMessageCallback) { +IN_PROC_BROWSER_TEST_F(NotificationTest, TestAddWebUIMessageCallback) { BalloonCollectionImpl* collection = GetBalloonCollectionImpl(); Profile* profile = browser()->profile(); collection->AddSystemNotification( NewMockNotification("1"), profile, false, false); - EXPECT_TRUE(collection->AddDOMUIMessageCallback( + EXPECT_TRUE(collection->AddWebUIMessageCallback( NewMockNotification("1"), "test", NewCallback( static_cast<NotificationTest*>(this), - &NotificationTest::HandleDOMUIMessage))); + &NotificationTest::HandleWebUIMessage))); // Adding callback for the same message twice should fail. - EXPECT_FALSE(collection->AddDOMUIMessageCallback( + EXPECT_FALSE(collection->AddWebUIMessageCallback( NewMockNotification("1"), "test", NewCallback( static_cast<NotificationTest*>(this), - &NotificationTest::HandleDOMUIMessage))); + &NotificationTest::HandleWebUIMessage))); // Adding callback to nonexistent notification should fail. - EXPECT_FALSE(collection->AddDOMUIMessageCallback( + EXPECT_FALSE(collection->AddWebUIMessageCallback( NewMockNotification("2"), "test1", NewCallback( static_cast<NotificationTest*>(this), - &NotificationTest::HandleDOMUIMessage))); + &NotificationTest::HandleWebUIMessage))); } -IN_PROC_BROWSER_TEST_F(NotificationTest, TestDOMUIMessageCallback) { +IN_PROC_BROWSER_TEST_F(NotificationTest, TestWebUIMessageCallback) { BalloonCollectionImpl* collection = GetBalloonCollectionImpl(); Profile* profile = browser()->profile(); // a notification that sends 'test' domui message back to chrome. @@ -583,12 +583,12 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestDOMUIMessageCallback) { profile, false, false); - EXPECT_TRUE(collection->AddDOMUIMessageCallback( + EXPECT_TRUE(collection->AddWebUIMessageCallback( NewMockNotification("1"), "test", NewCallback( static_cast<NotificationTest*>(this), - &NotificationTest::HandleDOMUIMessage))); + &NotificationTest::HandleWebUIMessage))); MessageLoop::current()->Run(); } diff --git a/chrome/browser/chromeos/notifications/system_notification.cc b/chrome/browser/chromeos/notifications/system_notification.cc index ad45b4f..d02158f 100644 --- a/chrome/browser/chromeos/notifications/system_notification.cc +++ b/chrome/browser/chromeos/notifications/system_notification.cc @@ -75,7 +75,7 @@ void SystemNotification::Show(const string16& message, collection_->AddSystemNotification(notify, profile_, sticky, false /* no controls */); - collection_->AddDOMUIMessageCallback(notify, "link", callback); + collection_->AddWebUIMessageCallback(notify, "link", callback); } visible_ = true; urgent_ = urgent; |