Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: chrome/browser/cookie_modal_dialog_views.cc

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(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 int CookiePromptModalDialog::GetDialogButtons() {
16 #if defined(OS_WIN)
17 return dialog_->GetDialogButtons();
18 #else
19 return 0;
20 #endif
21 }
22
23 void CookiePromptModalDialog::AcceptWindow() {
24 #if defined(OS_WIN)
25 views::DialogClientView* client_view =
26 dialog_->window()->GetClientView()->AsDialogClientView();
27 client_view->AcceptWindow();
28 #endif
29 }
30
31 void CookiePromptModalDialog::CancelWindow() {
32 #if defined(OS_WIN)
33 views::DialogClientView* client_view =
34 dialog_->window()->GetClientView()->AsDialogClientView();
35 client_view->CancelWindow();
36 #endif
37 }
38
39
40 NativeDialog CookiePromptModalDialog::CreateNativeDialog() {
41 #if defined(OS_WIN)
42 if (cookie_ui_) {
43 return new CookiePromptView(this,
44 tab_contents_->GetMessageBoxRootWindow(),
45 tab_contents_->profile(),
46 url_, cookie_line_, delegate_);
47 }
48 return new CookiePromptView(this,
49 tab_contents_->GetMessageBoxRootWindow(),
50 tab_contents_->profile(),
51 storage_info_, delegate_);
52 #else
53 return NULL;
54 #endif
55 }
OLDNEW
« no previous file with comments | « chrome/browser/cookie_modal_dialog.cc ('k') | chrome/browser/cookie_prompt_modal_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698