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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 audio_muter_->StopMuting(); | 1120 audio_muter_->StopMuting(); |
1121 } | 1121 } |
1122 | 1122 |
1123 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 1123 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
1124 DidUpdateAudioMutingState(mute)); | 1124 DidUpdateAudioMutingState(mute)); |
1125 | 1125 |
1126 // Notification for UI updates in response to the changed muting state. | 1126 // Notification for UI updates in response to the changed muting state. |
1127 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); | 1127 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
1128 } | 1128 } |
1129 | 1129 |
| 1130 bool WebContentsImpl::IsBluetoothDeviceConnected() const { |
| 1131 return bluetooth_device_connected_; |
| 1132 } |
| 1133 |
| 1134 void WebContentsImpl::SetBluetoothDeviceConnected(bool connected) { |
| 1135 bluetooth_device_connected_ = connected; |
| 1136 // Notification for UI updates in response to the connected device. |
| 1137 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
| 1138 } |
| 1139 |
1130 bool WebContentsImpl::IsCrashed() const { | 1140 bool WebContentsImpl::IsCrashed() const { |
1131 return (crashed_status_ == base::TERMINATION_STATUS_PROCESS_CRASHED || | 1141 return (crashed_status_ == base::TERMINATION_STATUS_PROCESS_CRASHED || |
1132 crashed_status_ == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || | 1142 crashed_status_ == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || |
1133 crashed_status_ == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || | 1143 crashed_status_ == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || |
1134 #if defined(OS_CHROMEOS) | 1144 #if defined(OS_CHROMEOS) |
1135 crashed_status_ == | 1145 crashed_status_ == |
1136 base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM || | 1146 base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM || |
1137 #endif | 1147 #endif |
1138 crashed_status_ == base::TERMINATION_STATUS_LAUNCH_FAILED | 1148 crashed_status_ == base::TERMINATION_STATUS_LAUNCH_FAILED |
1139 ); | 1149 ); |
(...skipping 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4788 const WebContentsObserver::MediaPlayerId& id) { | 4798 const WebContentsObserver::MediaPlayerId& id) { |
4789 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4799 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4790 } | 4800 } |
4791 | 4801 |
4792 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4802 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
4793 JavaScriptDialogManager* dialog_manager) { | 4803 JavaScriptDialogManager* dialog_manager) { |
4794 dialog_manager_ = dialog_manager; | 4804 dialog_manager_ = dialog_manager; |
4795 } | 4805 } |
4796 | 4806 |
4797 } // namespace content | 4807 } // namespace content |
OLD | NEW |