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

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

Issue 7024032: Wait showing html dialog until renderer finish painting after page is loaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang error Created 9 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) 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 #ifndef CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" 11 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
12 #include "chrome/browser/ui/webui/html_dialog_ui.h" 12 #include "chrome/browser/ui/webui/html_dialog_ui.h"
13 #include "chrome/browser/ui/views/html_dialog_view.h" 13 #include "chrome/browser/ui/views/html_dialog_view.h"
14 #include "views/window/window_delegate.h" 14 #include "views/window/window_delegate.h"
15 15
16 class BrowserView; 16 class BrowserView;
17 17
18 // A customized dialog view for the keyboard overlay. 18 // A customized dialog view for the keyboard overlay.
19 class KeyboardOverlayDialogView : public HtmlDialogView { 19 class KeyboardOverlayDialogView : public HtmlDialogView {
20 public: 20 public:
21 KeyboardOverlayDialogView(Profile* profile, 21 KeyboardOverlayDialogView(Profile* profile,
22 HtmlDialogUIDelegate* delegate, 22 HtmlDialogUIDelegate* delegate,
23 BrowserView* parent_view); 23 BrowserView* parent_view);
24 virtual ~KeyboardOverlayDialogView(); 24 virtual ~KeyboardOverlayDialogView();
25 25
26 // Initializes the contents of the dialog (the DOMView and the callbacks).
27 void InitDialog();
28
29 // Overridden from views::View: 26 // Overridden from views::View:
30 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 27 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
31 28
32 // Shows the keyboard overlay. 29 // Shows the keyboard overlay.
33 static void ShowDialog(gfx::NativeWindow owning_window, BrowserView* parent); 30 static void ShowDialog(gfx::NativeWindow owning_window, BrowserView* parent);
34 31
35 private: 32 private:
33 virtual void RegisterDialogAccelerators() OVERRIDE;
34
36 // Returns true if |accelerator| is an accelerator for closing the dialog. 35 // Returns true if |accelerator| is an accelerator for closing the dialog.
37 bool IsCloseAccelerator(const views::Accelerator& accelerator); 36 bool IsCloseAccelerator(const views::Accelerator& accelerator);
38 37
39 // Points to the view from which this dialog is created. 38 // Points to the view from which this dialog is created.
40 BrowserView* parent_view_; 39 BrowserView* parent_view_;
41 40
42 // Contains accelerators for closing this dialog. 41 // Contains accelerators for closing this dialog.
43 std::set<views::Accelerator> close_accelerators_; 42 std::set<views::Accelerator> close_accelerators_;
44 43
45 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDialogView); 44 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDialogView);
46 }; 45 };
47 46
48 #endif // CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_ 47 #endif // CHROME_BROWSER_UI_VIEWS_KEYBOARD_OVERLAY_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view_browsertest.cc ('k') | chrome/browser/ui/views/keyboard_overlay_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698