| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "app/message_box_flags.h" | 9 #include "app/message_box_flags.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 4477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4488 bool* success) { | 4488 bool* success) { |
| 4489 *success = false; | 4489 *success = false; |
| 4490 if (browser_tracker_->ContainsHandle(handle)) { | 4490 if (browser_tracker_->ContainsHandle(handle)) { |
| 4491 Browser* browser = browser_tracker_->GetResource(handle); | 4491 Browser* browser = browser_tracker_->GetResource(handle); |
| 4492 HostContentSettingsMap* map = | 4492 HostContentSettingsMap* map = |
| 4493 browser->profile()->GetHostContentSettingsMap(); | 4493 browser->profile()->GetHostContentSettingsMap(); |
| 4494 if (host.empty()) { | 4494 if (host.empty()) { |
| 4495 map->SetDefaultContentSetting(content_type, setting); | 4495 map->SetDefaultContentSetting(content_type, setting); |
| 4496 } else { | 4496 } else { |
| 4497 map->SetContentSetting(HostContentSettingsMap::Pattern(host), | 4497 map->SetContentSetting(HostContentSettingsMap::Pattern(host), |
| 4498 content_type, setting); | 4498 content_type, "", setting); |
| 4499 } | 4499 } |
| 4500 *success = true; | 4500 *success = true; |
| 4501 } | 4501 } |
| 4502 } | 4502 } |
| 4503 | 4503 |
| 4504 #if !defined(TOOLKIT_VIEWS) | 4504 #if !defined(TOOLKIT_VIEWS) |
| 4505 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { | 4505 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { |
| 4506 NOTIMPLEMENTED(); | 4506 NOTIMPLEMENTED(); |
| 4507 }; | 4507 }; |
| 4508 | 4508 |
| 4509 void AutomationProvider::WaitForFocusedViewIDToChange( | 4509 void AutomationProvider::WaitForFocusedViewIDToChange( |
| 4510 int handle, int previous_view_id, IPC::Message* reply_message) { | 4510 int handle, int previous_view_id, IPC::Message* reply_message) { |
| 4511 NOTIMPLEMENTED(); | 4511 NOTIMPLEMENTED(); |
| 4512 } | 4512 } |
| 4513 | 4513 |
| 4514 void AutomationProvider::StartTrackingPopupMenus( | 4514 void AutomationProvider::StartTrackingPopupMenus( |
| 4515 int browser_handle, bool* success) { | 4515 int browser_handle, bool* success) { |
| 4516 NOTIMPLEMENTED(); | 4516 NOTIMPLEMENTED(); |
| 4517 } | 4517 } |
| 4518 | 4518 |
| 4519 void AutomationProvider::WaitForPopupMenuToOpen(IPC::Message* reply_message) { | 4519 void AutomationProvider::WaitForPopupMenuToOpen(IPC::Message* reply_message) { |
| 4520 NOTIMPLEMENTED(); | 4520 NOTIMPLEMENTED(); |
| 4521 } | 4521 } |
| 4522 #endif // !defined(TOOLKIT_VIEWS) | 4522 #endif // !defined(TOOLKIT_VIEWS) |
| 4523 | 4523 |
| 4524 void AutomationProvider::ResetToDefaultTheme() { | 4524 void AutomationProvider::ResetToDefaultTheme() { |
| 4525 profile_->ClearTheme(); | 4525 profile_->ClearTheme(); |
| 4526 } | 4526 } |
| OLD | NEW |