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

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

Issue 6246001: Move app/key* to ui/base/keycodes/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/info_bubble.cc ('k') | chrome/browser/ui/views/keyword_editor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "app/keyboard_codes.h"
8 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
9 #include "app/message_box_flags.h" 8 #include "app/message_box_flags.h"
10 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 10 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
12 #include "chrome/browser/ui/views/window.h" 11 #include "chrome/browser/ui/views/window.h"
13 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "ui/base/keycodes/keyboard_codes.h"
14 #include "views/controls/message_box_view.h" 14 #include "views/controls/message_box_view.h"
15 #include "views/window/window.h" 15 #include "views/window/window.h"
16 16
17 //////////////////////////////////////////////////////////////////////////////// 17 ////////////////////////////////////////////////////////////////////////////////
18 // JSModalDialogViews, public: 18 // JSModalDialogViews, public:
19 19
20 JSModalDialogViews::JSModalDialogViews( 20 JSModalDialogViews::JSModalDialogViews(
21 JavaScriptAppModalDialog* parent) 21 JavaScriptAppModalDialog* parent)
22 : parent_(parent), 22 : parent_(parent),
23 message_box_view_(new MessageBoxView( 23 message_box_view_(new MessageBoxView(
24 parent->dialog_flags() | MessageBoxFlags::kAutoDetectAlignment, 24 parent->dialog_flags() | MessageBoxFlags::kAutoDetectAlignment,
25 parent->message_text(), parent->default_prompt_text())) { 25 parent->message_text(), parent->default_prompt_text())) {
26 DCHECK(message_box_view_); 26 DCHECK(message_box_view_);
27 27
28 message_box_view_->AddAccelerator( 28 message_box_view_->AddAccelerator(
29 views::Accelerator(app::VKEY_C, false, true, false)); 29 views::Accelerator(ui::VKEY_C, false, true, false));
30 if (parent->display_suppress_checkbox()) { 30 if (parent->display_suppress_checkbox()) {
31 message_box_view_->SetCheckBoxLabel(UTF16ToWide( 31 message_box_view_->SetCheckBoxLabel(UTF16ToWide(
32 l10n_util::GetStringUTF16(IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION))); 32 l10n_util::GetStringUTF16(IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION)));
33 } 33 }
34 } 34 }
35 35
36 JSModalDialogViews::~JSModalDialogViews() { 36 JSModalDialogViews::~JSModalDialogViews() {
37 } 37 }
38 38
39 //////////////////////////////////////////////////////////////////////////////// 39 ////////////////////////////////////////////////////////////////////////////////
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 // static 149 // static
150 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( 150 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt(
151 JavaScriptAppModalDialog* dialog, 151 JavaScriptAppModalDialog* dialog,
152 gfx::NativeWindow parent_window) { 152 gfx::NativeWindow parent_window) {
153 JSModalDialogViews* d = new JSModalDialogViews(dialog); 153 JSModalDialogViews* d = new JSModalDialogViews(dialog);
154 154
155 browser::CreateViewsWindow(parent_window, gfx::Rect(), d); 155 browser::CreateViewsWindow(parent_window, gfx::Rect(), d);
156 return d; 156 return d;
157 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/info_bubble.cc ('k') | chrome/browser/ui/views/keyword_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698