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

Side by Side Diff: chrome/browser/ui/views/js_modal_dialog_views.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/js_modal_dialog_views.h" 5 #include "chrome/browser/ui/views/js_modal_dialog_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 8 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
9 #include "chrome/browser/ui/views/window.h" 9 #include "chrome/browser/ui/views/window.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 10 matching lines...) Expand all
21 JSModalDialogViews::JSModalDialogViews( 21 JSModalDialogViews::JSModalDialogViews(
22 JavaScriptAppModalDialog* parent) 22 JavaScriptAppModalDialog* parent)
23 : parent_(parent), 23 : parent_(parent),
24 message_box_view_(new views::MessageBoxView( 24 message_box_view_(new views::MessageBoxView(
25 parent->dialog_flags() | ui::MessageBoxFlags::kAutoDetectAlignment, 25 parent->dialog_flags() | ui::MessageBoxFlags::kAutoDetectAlignment,
26 parent->message_text(), 26 parent->message_text(),
27 parent->default_prompt_text())) { 27 parent->default_prompt_text())) {
28 DCHECK(message_box_view_); 28 DCHECK(message_box_view_);
29 29
30 message_box_view_->AddAccelerator( 30 message_box_view_->AddAccelerator(
31 views::Accelerator(ui::VKEY_C, false, true, false)); 31 ui::Accelerator(ui::VKEY_C, false, true, false));
32 if (parent->display_suppress_checkbox()) { 32 if (parent->display_suppress_checkbox()) {
33 message_box_view_->SetCheckBoxLabel( 33 message_box_view_->SetCheckBoxLabel(
34 l10n_util::GetStringUTF16(IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION)); 34 l10n_util::GetStringUTF16(IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION));
35 } 35 }
36 } 36 }
37 37
38 JSModalDialogViews::~JSModalDialogViews() { 38 JSModalDialogViews::~JSModalDialogViews() {
39 } 39 }
40 40
41 //////////////////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////////////////
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 // static 163 // static
164 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( 164 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt(
165 JavaScriptAppModalDialog* dialog, 165 JavaScriptAppModalDialog* dialog,
166 gfx::NativeWindow parent_window) { 166 gfx::NativeWindow parent_window) {
167 JSModalDialogViews* d = new JSModalDialogViews(dialog); 167 JSModalDialogViews* d = new JSModalDialogViews(dialog);
168 168
169 browser::CreateViewsWindow(parent_window, d); 169 browser::CreateViewsWindow(parent_window, d);
170 return d; 170 return d;
171 } 171 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view.cc ('k') | chrome/browser/ui/views/keyboard_overlay_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698