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

Side by Side Diff: chrome/browser/extensions/extension_test_api.cc

Issue 3035053: Merge 54514 - Set a max limit on extension items' labels in context menus.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/479/src/
Patch Set: Created 10 years, 4 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/extension_test_api.h" 5 #include "chrome/browser/extensions/extension_test_api.h"
6 6
7 #include <string>
8
7 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
8 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
9 #include "chrome/browser/extensions/extensions_service.h" 11 #include "chrome/browser/extensions/extensions_service.h"
10 #include "chrome/browser/extensions/extensions_quota_service.h" 12 #include "chrome/browser/extensions/extensions_quota_service.h"
11 #include "chrome/common/notification_service.h" 13 #include "chrome/common/notification_service.h"
12 14
13 bool ExtensionTestPassFunction::RunImpl() { 15 bool ExtensionTestPassFunction::RunImpl() {
14 NotificationService::current()->Notify( 16 NotificationService::current()->Notify(
15 NotificationType::EXTENSION_TEST_PASSED, 17 NotificationType::EXTENSION_TEST_PASSED,
16 Source<Profile>(dispatcher()->profile()), 18 Source<Profile>(dispatcher()->profile()),
(...skipping 26 matching lines...) Expand all
43 quota->violators_.clear(); 45 quota->violators_.clear();
44 return true; 46 return true;
45 } 47 }
46 48
47 bool ExtensionTestCreateIncognitoTabFunction::RunImpl() { 49 bool ExtensionTestCreateIncognitoTabFunction::RunImpl() {
48 std::string url; 50 std::string url;
49 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url)); 51 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));
50 Browser::OpenURLOffTheRecord(profile(), GURL(url)); 52 Browser::OpenURLOffTheRecord(profile(), GURL(url));
51 return true; 53 return true;
52 } 54 }
55
56 bool ExtensionTestSendMessageFunction::RunImpl() {
57 std::string message;
58 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message));
59 std::string id = extension_id();
60 NotificationService::current()->Notify(
61 NotificationType::EXTENSION_TEST_MESSAGE,
62 Source<std::string>(&id),
63 Details<std::string>(&message));
64 return true;
65 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_test_api.h ('k') | chrome/browser/extensions/extension_test_message_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698