OLD | NEW |
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 "base/base64.h" | 5 #include "base/base64.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "net/url_request/url_request_context.h" | 39 #include "net/url_request/url_request_context.h" |
40 #include "net/url_request/url_request_context_getter.h" | 40 #include "net/url_request/url_request_context_getter.h" |
41 #include "url/gurl.h" | 41 #include "url/gurl.h" |
42 | 42 |
43 namespace extensions { | 43 namespace extensions { |
44 namespace { | 44 namespace { |
45 | 45 |
46 class MessageSender : public content::NotificationObserver { | 46 class MessageSender : public content::NotificationObserver { |
47 public: | 47 public: |
48 MessageSender() { | 48 MessageSender() { |
49 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, | 49 registrar_.Add(this, |
| 50 extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
50 content::NotificationService::AllSources()); | 51 content::NotificationService::AllSources()); |
51 } | 52 } |
52 | 53 |
53 private: | 54 private: |
54 static scoped_ptr<base::ListValue> BuildEventArguments( | 55 static scoped_ptr<base::ListValue> BuildEventArguments( |
55 const bool last_message, | 56 const bool last_message, |
56 const std::string& data) { | 57 const std::string& data) { |
57 base::DictionaryValue* event = new base::DictionaryValue(); | 58 base::DictionaryValue* event = new base::DictionaryValue(); |
58 event->SetBoolean("lastMessage", last_message); | 59 event->SetBoolean("lastMessage", last_message); |
59 event->SetString("data", data); | 60 event->SetString("data", data); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); | 1058 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); |
1058 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, | 1059 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, |
1059 CanConnectAndSendMessagesToMainFrame(invalid)); | 1060 CanConnectAndSendMessagesToMainFrame(invalid)); |
1060 } | 1061 } |
1061 | 1062 |
1062 #endif // !defined(OS_WIN) - http://crbug.com/350517. | 1063 #endif // !defined(OS_WIN) - http://crbug.com/350517. |
1063 | 1064 |
1064 } // namespace | 1065 } // namespace |
1065 | 1066 |
1066 }; // namespace extensions | 1067 }; // namespace extensions |
OLD | NEW |