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

Side by Side Diff: chrome/browser/chromeos/login/webui_login_view.cc

Issue 8676032: Move RenderViewHostObserver to content/public/browser/ and put it into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add render_view_host.h to DEPS file Created 9 years 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 | « no previous file | chrome/browser/debugger/devtools_window.h » ('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/chromeos/login/webui_login_view.h" 5 #include "chrome/browser/chromeos/login/webui_login_view.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 12 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
13 #include "chrome/browser/chromeos/cros/cros_library.h" 13 #include "chrome/browser/chromeos/cros/cros_library.h"
14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" 14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
15 #include "chrome/browser/chromeos/dbus/session_manager_client.h" 15 #include "chrome/browser/chromeos/dbus/session_manager_client.h"
16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" 16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
17 #include "chrome/browser/chromeos/login/webui_login_display.h" 17 #include "chrome/browser/chromeos/login/webui_login_display.h"
18 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" 18 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
19 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/browser/ui/views/dom_view.h" 20 #include "chrome/browser/ui/views/dom_view.h"
21 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 21 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
22 #include "chrome/common/render_messages.h" 22 #include "chrome/common/render_messages.h"
23 #include "content/browser/renderer_host/render_view_host_observer.h"
24 #include "content/browser/tab_contents/tab_contents.h" 23 #include "content/browser/tab_contents/tab_contents.h"
24 #include "content/public/browser/render_view_host_observer.h"
25 #include "ui/gfx/rect.h" 25 #include "ui/gfx/rect.h"
26 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 28
29 #if defined(TOOLKIT_USES_GTK) 29 #if defined(TOOLKIT_USES_GTK)
30 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" 30 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h"
31 #include "ui/views/widget/native_widget_gtk.h" 31 #include "ui/views/widget/native_widget_gtk.h"
32 #endif 32 #endif
33 33
34 #if defined(USE_VIRTUAL_KEYBOARD) 34 #if defined(USE_VIRTUAL_KEYBOARD)
35 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" 35 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
36 #endif 36 #endif
37 37
38 namespace { 38 namespace {
39 39
40 const char kViewClassName[] = "browser/chromeos/login/WebUILoginView"; 40 const char kViewClassName[] = "browser/chromeos/login/WebUILoginView";
41 41
42 // These strings must be kept in sync with handleAccelerator() in oobe.js. 42 // These strings must be kept in sync with handleAccelerator() in oobe.js.
43 const char kAccelNameAccessibility[] = "accessibility"; 43 const char kAccelNameAccessibility[] = "accessibility";
44 const char kAccelNameCancel[] = "cancel"; 44 const char kAccelNameCancel[] = "cancel";
45 const char kAccelNameEnrollment[] = "enrollment"; 45 const char kAccelNameEnrollment[] = "enrollment";
46 46
47 // Observes IPC messages from the FrameSniffer and notifies JS if error 47 // Observes IPC messages from the FrameSniffer and notifies JS if error
48 // appears. 48 // appears.
49 class SnifferObserver : public RenderViewHostObserver { 49 class SnifferObserver : public content::RenderViewHostObserver {
50 public: 50 public:
51 SnifferObserver(RenderViewHost* host, WebUI* webui) 51 SnifferObserver(RenderViewHost* host, WebUI* webui)
52 : RenderViewHostObserver(host), webui_(webui) { 52 : content::RenderViewHostObserver(host), webui_(webui) {
53 DCHECK(webui_); 53 DCHECK(webui_);
54 Send(new ChromeViewMsg_StartFrameSniffer(routing_id(), 54 Send(new ChromeViewMsg_StartFrameSniffer(routing_id(),
55 UTF8ToUTF16("gaia-frame"))); 55 UTF8ToUTF16("gaia-frame")));
56 } 56 }
57 57
58 virtual ~SnifferObserver() {} 58 virtual ~SnifferObserver() {}
59 59
60 // IPC::Channel::Listener implementation. 60 // IPC::Channel::Listener implementation.
61 virtual bool OnMessageReceived(const IPC::Message& message) { 61 virtual bool OnMessageReceived(const IPC::Message& message) {
62 bool handled = true; 62 bool handled = true;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding 402 // when the focus is inside an iframe. Only clear on KeyDown to prevent hiding
403 // an immediate authentication error (See crbug.com/103643). 403 // an immediate authentication error (See crbug.com/103643).
404 if (event.type == WebKit::WebInputEvent::KeyDown) { 404 if (event.type == WebKit::WebInputEvent::KeyDown) {
405 WebUI* web_ui = GetWebUI(); 405 WebUI* web_ui = GetWebUI();
406 if (web_ui) 406 if (web_ui)
407 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); 407 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors");
408 } 408 }
409 } 409 }
410 410
411 } // namespace chromeos 411 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/debugger/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698