OLD | NEW |
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/touch/frame/keyboard_container_view.h" | 5 #include "chrome/browser/ui/touch/frame/keyboard_container_view.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/views/dom_view.h" | 9 #include "chrome/browser/ui/views/dom_view.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
11 #include "content/browser/site_instance.h" | 11 #include "content/browser/site_instance.h" |
12 #include "content/browser/tab_contents/tab_contents.h" | 12 #include "content/browser/tab_contents/tab_contents.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Make the provided view and all of its descendents unfocusable. | 16 // Make the provided view and all of its descendents unfocusable. |
17 void MakeViewHierarchyUnfocusable(views::View* view) { | 17 void MakeViewHierarchyUnfocusable(views::View* view) { |
18 view->set_focusable(false); | 18 view->set_focusable(false); |
19 for (int i = 0; i < view->child_count(); ++i) { | 19 for (int i = 0; i < view->child_count(); ++i) { |
20 MakeViewHierarchyUnfocusable(view->GetChildViewAt(i)); | 20 MakeViewHierarchyUnfocusable(view->child_at(i)); |
21 } | 21 } |
22 } | 22 } |
23 | 23 |
24 } // namepsace | 24 } // namepsace |
25 | 25 |
26 // static | 26 // static |
27 const char KeyboardContainerView::kViewClassName[] = | 27 const char KeyboardContainerView::kViewClassName[] = |
28 "browser/ui/touch/frame/KeyboardContainerView"; | 28 "browser/ui/touch/frame/KeyboardContainerView"; |
29 | 29 |
30 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 IPC_MESSAGE_UNHANDLED(handled = false) | 89 IPC_MESSAGE_UNHANDLED(handled = false) |
90 IPC_END_MESSAGE_MAP() | 90 IPC_END_MESSAGE_MAP() |
91 return handled; | 91 return handled; |
92 } | 92 } |
93 | 93 |
94 void KeyboardContainerView::OnRequest( | 94 void KeyboardContainerView::OnRequest( |
95 const ExtensionHostMsg_Request_Params& request) { | 95 const ExtensionHostMsg_Request_Params& request) { |
96 extension_function_dispatcher_.Dispatch(request, | 96 extension_function_dispatcher_.Dispatch(request, |
97 dom_view_->tab_contents()->render_view_host()); | 97 dom_view_->tab_contents()->render_view_host()); |
98 } | 98 } |
OLD | NEW |