| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/cookie_modal_dialog.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "chrome/browser/views/cookie_prompt_view.h" | |
| 9 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 10 #include "views/window/window.h" | |
| 11 | |
| 12 | |
| 13 // TODO(zelidrag): Make this work on Linux (views). | |
| 14 | |
| 15 void CookiePromptModalDialog::AcceptWindow() { | |
| 16 #if defined(OS_WIN) | |
| 17 views::DialogClientView* client_view = | |
| 18 dialog_->window()->GetClientView()->AsDialogClientView(); | |
| 19 client_view->AcceptWindow(); | |
| 20 #endif | |
| 21 } | |
| 22 | |
| 23 void CookiePromptModalDialog::CancelWindow() { | |
| 24 #if defined(OS_WIN) | |
| 25 views::DialogClientView* client_view = | |
| 26 dialog_->window()->GetClientView()->AsDialogClientView(); | |
| 27 client_view->CancelWindow(); | |
| 28 #endif | |
| 29 } | |
| 30 | |
| 31 | |
| 32 NativeDialog CookiePromptModalDialog::CreateNativeDialog() { | |
| 33 #if defined(OS_WIN) | |
| 34 return new CookiePromptView(this, | |
| 35 tab_contents_->GetMessageBoxRootWindow(), | |
| 36 tab_contents_->profile()); | |
| 37 #else | |
| 38 NOTIMPLEMENTED(); | |
| 39 return NULL; | |
| 40 #endif | |
| 41 } | |
| OLD | NEW |