| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, | 174 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, |
| 175 content::NotificationService::AllSources()); | 175 content::NotificationService::AllSources()); |
| 176 } else if (!wait_for_prompt) { | 176 } else if (!wait_for_prompt) { |
| 177 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 177 registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
| 178 content::NotificationService::AllSources()); | 178 content::NotificationService::AllSources()); |
| 179 registrar_.Add(this, content::NOTIFICATION_LOAD_START, | 179 registrar_.Add(this, content::NOTIFICATION_LOAD_START, |
| 180 content::NotificationService::AllSources()); | 180 content::NotificationService::AllSources()); |
| 181 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, | 181 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, |
| 182 content::NotificationService::AllSources()); | 182 content::NotificationService::AllSources()); |
| 183 } | 183 } |
| 184 mock_view_->SetBrowserTest(true); | 184 if (PermissionBubbleManager::Enabled()) |
| 185 mock_view_->SetBrowserTest(true); |
| 185 } | 186 } |
| 186 | 187 |
| 187 GeolocationNotificationObserver::~GeolocationNotificationObserver() { | 188 GeolocationNotificationObserver::~GeolocationNotificationObserver() { |
| 188 } | 189 } |
| 189 | 190 |
| 190 void GeolocationNotificationObserver::Observe( | 191 void GeolocationNotificationObserver::Observe( |
| 191 int type, | 192 int type, |
| 192 const content::NotificationSource& source, | 193 const content::NotificationSource& source, |
| 193 const content::NotificationDetails& details) { | 194 const content::NotificationDetails& details) { |
| 194 if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) { | 195 if (type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED) { |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 ->GetLastUsage(current_url().GetOrigin(), | 897 ->GetLastUsage(current_url().GetOrigin(), |
| 897 current_url().GetOrigin(), | 898 current_url().GetOrigin(), |
| 898 CONTENT_SETTINGS_TYPE_GEOLOCATION) | 899 CONTENT_SETTINGS_TYPE_GEOLOCATION) |
| 899 .ToDoubleT(), | 900 .ToDoubleT(), |
| 900 13); | 901 13); |
| 901 } | 902 } |
| 902 | 903 |
| 903 INSTANTIATE_TEST_CASE_P(GeolocationBrowserTestWithParams, | 904 INSTANTIATE_TEST_CASE_P(GeolocationBrowserTestWithParams, |
| 904 GeolocationBrowserTest, | 905 GeolocationBrowserTest, |
| 905 testing::Values(false)); | 906 testing::Values(false)); |
| OLD | NEW |