| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/touch_browser_frame_view.h" | 5 #include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
| 9 #include "chrome/browser/tab_contents/navigation_controller.h" | 9 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| 11 #include "chrome/browser/tabs/tab_strip_model.h" | 11 #include "chrome/browser/tabs/tab_strip_model.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 14 #include "chrome/browser/ui/touch/frame/keyboard_container_view.h" | 14 #include "chrome/browser/ui/touch/frame/keyboard_container_view.h" |
| 15 #include "chrome/browser/ui/views/frame/browser_view.h" | 15 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 16 #include "chrome/common/notification_service.h" | 16 #include "chrome/common/notification_service.h" |
| 17 #include "chrome/common/notification_type.h" | 17 #include "chrome/common/notification_type.h" |
| 18 #include "gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const int kKeyboardHeight = 300; | 22 const int kKeyboardHeight = 300; |
| 23 | 23 |
| 24 PropertyAccessor<bool>* GetFocusedStateAccessor() { | 24 PropertyAccessor<bool>* GetFocusedStateAccessor() { |
| 25 static PropertyAccessor<bool> state; | 25 static PropertyAccessor<bool> state; |
| 26 return &state; | 26 return &state; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 Browser* source_browser = Browser::GetBrowserForController( | 145 Browser* source_browser = Browser::GetBrowserForController( |
| 146 Source<NavigationController>(source).ptr(), NULL); | 146 Source<NavigationController>(source).ptr(), NULL); |
| 147 // If the Browser for the keyboard has navigated, hide the keyboard. | 147 // If the Browser for the keyboard has navigated, hide the keyboard. |
| 148 if (source_browser == browser) | 148 if (source_browser == browser) |
| 149 UpdateKeyboardAndLayout(false); | 149 UpdateKeyboardAndLayout(false); |
| 150 } else if (type == NotificationType::TAB_CONTENTS_DESTROYED) { | 150 } else if (type == NotificationType::TAB_CONTENTS_DESTROYED) { |
| 151 GetFocusedStateAccessor()->DeleteProperty( | 151 GetFocusedStateAccessor()->DeleteProperty( |
| 152 Source<TabContents>(source).ptr()->property_bag()); | 152 Source<TabContents>(source).ptr()->property_bag()); |
| 153 } | 153 } |
| 154 } | 154 } |
| OLD | NEW |