| 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 "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" | 5 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "chrome/browser/ui/browser_dialogs.h" | 9 #include "chrome/browser/ui/browser_dialogs.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void BluetoothPairingDialog::GetWebUIMessageHandlers( | 69 void BluetoothPairingDialog::GetWebUIMessageHandlers( |
| 70 std::vector<WebUIMessageHandler*>* handlers) const { | 70 std::vector<WebUIMessageHandler*>* handlers) const { |
| 71 } | 71 } |
| 72 | 72 |
| 73 void BluetoothPairingDialog::GetDialogSize(gfx::Size* size) const { | 73 void BluetoothPairingDialog::GetDialogSize(gfx::Size* size) const { |
| 74 size->SetSize(kDefaultWidth, kDefaultHeight); | 74 size->SetSize(kDefaultWidth, kDefaultHeight); |
| 75 } | 75 } |
| 76 | 76 |
| 77 std::string BluetoothPairingDialog::GetDialogArgs() const { | 77 std::string BluetoothPairingDialog::GetDialogArgs() const { |
| 78 std::string data; | 78 std::string data; |
| 79 base::JSONWriter::Write(&device_data_, &data); | 79 base::JSONWriter::Write(device_data_, &data); |
| 80 return data; | 80 return data; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void BluetoothPairingDialog::OnDialogClosed(const std::string& json_retval) { | 83 void BluetoothPairingDialog::OnDialogClosed(const std::string& json_retval) { |
| 84 delete this; | 84 delete this; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void BluetoothPairingDialog::OnCloseContents(WebContents* source, | 87 void BluetoothPairingDialog::OnCloseContents(WebContents* source, |
| 88 bool* out_close_dialog) { | 88 bool* out_close_dialog) { |
| 89 *out_close_dialog = true; | 89 *out_close_dialog = true; |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool BluetoothPairingDialog::ShouldShowDialogTitle() const { | 92 bool BluetoothPairingDialog::ShouldShowDialogTitle() const { |
| 93 return true; | 93 return true; |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool BluetoothPairingDialog::HandleContextMenu( | 96 bool BluetoothPairingDialog::HandleContextMenu( |
| 97 const content::ContextMenuParams& params) { | 97 const content::ContextMenuParams& params) { |
| 98 // Disable context menu. | 98 // Disable context menu. |
| 99 return true; | 99 return true; |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // namespace chromeos | 102 } // namespace chromeos |
| OLD | NEW |