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

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

Issue 10448066: Move the web dialogs code to src/ui/web_dialogs from src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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
OLDNEW
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/ui/views/keyboard_overlay_dialog_view.h" 5 #include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
11 #include "chrome/browser/ui/views/keyboard_overlay_delegate.h" 11 #include "chrome/browser/ui/views/keyboard_overlay_delegate.h"
12 #include "chrome/browser/ui/webui/web_dialog_delegate.h"
13 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
14 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
16 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
16 #include "ui/web_dialogs/web_dialog_delegate.h"
17
18 using ui::WebDialogDelegate;
17 19
18 KeyboardOverlayDialogView::KeyboardOverlayDialogView( 20 KeyboardOverlayDialogView::KeyboardOverlayDialogView(
19 Profile* profile, 21 Profile* profile,
20 WebDialogDelegate* delegate) 22 WebDialogDelegate* delegate)
21 : WebDialogView(profile, NULL, delegate) { 23 : WebDialogView(profile, NULL, delegate) {
22 } 24 }
23 25
24 KeyboardOverlayDialogView::~KeyboardOverlayDialogView() { 26 KeyboardOverlayDialogView::~KeyboardOverlayDialogView() {
25 } 27 }
26 28
(...skipping 16 matching lines...) Expand all
43 delegate->GetDialogSize(&size); 45 delegate->GetDialogSize(&size);
44 gfx::Rect rect = gfx::Screen::GetMonitorNearestWindow( 46 gfx::Rect rect = gfx::Screen::GetMonitorNearestWindow(
45 view->GetWidget()->GetNativeView()).work_area(); 47 view->GetWidget()->GetNativeView()).work_area();
46 gfx::Rect bounds((rect.width() - size.width()) / 2, 48 gfx::Rect bounds((rect.width() - size.width()) / 2,
47 rect.height() - size.height(), 49 rect.height() - size.height(),
48 size.width(), 50 size.width(),
49 size.height()); 51 size.height());
50 view->GetWidget()->SetBounds(bounds); 52 view->GetWidget()->SetBounds(bounds);
51 view->GetWidget()->Show(); 53 view->GetWidget()->Show();
52 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_dialog_view.h ('k') | chrome/browser/ui/views/web_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698