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

Side by Side Diff: chrome/browser/extensions/api/notifications/notifications_api.cc

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/notifications/notifications_api.h" 5 #include "chrome/browser/extensions/api/notifications/notifications_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 optional_fields.clickable = *options->is_clickable; 327 optional_fields.clickable = *options->is_clickable;
328 328
329 NotificationsApiDelegate* api_delegate(new NotificationsApiDelegate( 329 NotificationsApiDelegate* api_delegate(new NotificationsApiDelegate(
330 this, GetProfile(), extension_->id(), id)); // ownership is passed to 330 this, GetProfile(), extension_->id(), id)); // ownership is passed to
331 // Notification 331 // Notification
332 Notification notification(type, 332 Notification notification(type,
333 extension_->url(), 333 extension_->url(),
334 title, 334 title,
335 message, 335 message,
336 icon, 336 icon,
337 WebKit::WebTextDirectionDefault, 337 blink::WebTextDirectionDefault,
338 message_center::NotifierId( 338 message_center::NotifierId(
339 message_center::NotifierId::APPLICATION, 339 message_center::NotifierId::APPLICATION,
340 extension_->id()), 340 extension_->id()),
341 UTF8ToUTF16(extension_->name()), 341 UTF8ToUTF16(extension_->name()),
342 UTF8ToUTF16(api_delegate->id()), 342 UTF8ToUTF16(api_delegate->id()),
343 optional_fields, 343 optional_fields,
344 api_delegate); 344 api_delegate);
345 345
346 g_browser_process->notification_ui_manager()->Add(notification, GetProfile()); 346 g_browser_process->notification_ui_manager()->Add(notification, GetProfile());
347 return true; 347 return true;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 ? api::notifications::PERMISSION_LEVEL_GRANTED 623 ? api::notifications::PERMISSION_LEVEL_GRANTED
624 : api::notifications::PERMISSION_LEVEL_DENIED; 624 : api::notifications::PERMISSION_LEVEL_DENIED;
625 625
626 SetResult(new base::StringValue(api::notifications::ToString(result))); 626 SetResult(new base::StringValue(api::notifications::ToString(result)));
627 SendResponse(true); 627 SendResponse(true);
628 628
629 return true; 629 return true;
630 } 630 }
631 631
632 } // namespace extensions 632 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/api/processes/processes_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698