Index: chrome/browser/ui/touch/frame/keyboard_container_view.cc |
diff --git a/chrome/browser/ui/touch/frame/keyboard_container_view.cc b/chrome/browser/ui/touch/frame/keyboard_container_view.cc |
deleted file mode 100644 |
index 5af9ed2dc850d4dcca8152576c6b590c21f2b1f5..0000000000000000000000000000000000000000 |
--- a/chrome/browser/ui/touch/frame/keyboard_container_view.cc |
+++ /dev/null |
@@ -1,100 +0,0 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "chrome/browser/ui/touch/frame/keyboard_container_view.h" |
- |
-#include "chrome/browser/profiles/profile.h" |
-#include "chrome/browser/ui/browser.h" |
-#include "chrome/browser/ui/views/dom_view.h" |
-#include "chrome/common/url_constants.h" |
-#include "content/browser/site_instance.h" |
-#include "content/browser/tab_contents/tab_contents.h" |
- |
-namespace { |
- |
-// Make the provided view and all of its descendents unfocusable. |
-void MakeViewHierarchyUnfocusable(views::View* view) { |
- view->set_focusable(false); |
- for (int i = 0; i < view->child_count(); ++i) { |
- MakeViewHierarchyUnfocusable(view->child_at(i)); |
- } |
-} |
- |
-} // namepsace |
- |
-// static |
-const char KeyboardContainerView::kViewClassName[] = |
- "browser/ui/touch/frame/KeyboardContainerView"; |
- |
-/////////////////////////////////////////////////////////////////////////////// |
-// KeyboardContainerView, public: |
- |
-KeyboardContainerView::KeyboardContainerView( |
- Profile* profile, Browser* browser, const GURL& url) |
- : dom_view_(new DOMView), |
- ALLOW_THIS_IN_INITIALIZER_LIST( |
- extension_function_dispatcher_(profile, this)), |
- browser_(browser) { |
- const GURL keyboard_url( |
- url.is_valid() ? url : GURL(chrome::kChromeUIKeyboardURL)); |
- dom_view_->Init(profile, |
- SiteInstance::CreateSiteInstanceForURL(profile, keyboard_url)); |
- dom_view_->LoadURL(keyboard_url); |
- |
- dom_view_->SetVisible(true); |
- AddChildView(dom_view_); |
- |
- // We have Inited the dom_view. So we must have a tab contents. |
- Observe(dom_view_->tab_contents()); |
-} |
- |
-KeyboardContainerView::~KeyboardContainerView() { |
-} |
- |
-std::string KeyboardContainerView::GetClassName() const { |
- return kViewClassName; |
-} |
- |
-void KeyboardContainerView::Layout() { |
- // TODO(bryeung): include a border between the keyboard and the client view |
- dom_view_->SetBounds(0, 0, width(), height()); |
-} |
- |
-void KeyboardContainerView::LoadURL(const GURL& keyboard_url) { |
- dom_view_->LoadURL(keyboard_url); |
-} |
- |
-Browser* KeyboardContainerView::GetBrowser() { |
- return browser_; |
-} |
- |
-gfx::NativeView KeyboardContainerView::GetNativeViewOfHost() { |
- return dom_view_->native_view(); |
-} |
- |
-TabContents* KeyboardContainerView::GetAssociatedTabContents() const { |
- return dom_view_->tab_contents(); |
-} |
- |
-void KeyboardContainerView::ViewHierarchyChanged(bool is_add, |
- View* parent, |
- View* child) { |
- if (is_add && Contains(child)) |
- MakeViewHierarchyUnfocusable(child); |
-} |
- |
-bool KeyboardContainerView::OnMessageReceived(const IPC::Message& message) { |
- bool handled = true; |
- IPC_BEGIN_MESSAGE_MAP(KeyboardContainerView, message) |
- IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
- IPC_MESSAGE_UNHANDLED(handled = false) |
- IPC_END_MESSAGE_MAP() |
- return handled; |
-} |
- |
-void KeyboardContainerView::OnRequest( |
- const ExtensionHostMsg_Request_Params& request) { |
- extension_function_dispatcher_.Dispatch(request, |
- dom_view_->tab_contents()->render_view_host()); |
-} |