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

Side by Side Diff: ui/keyboard/keyboard_controller_unittest.cc

Issue 159473002: Restore screen work area after login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit and change HasKeyboardWindow to virtual function Created 6 years, 10 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
« no previous file with comments | « ui/keyboard/keyboard_controller_proxy.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/aura/client/focus_client.h" 10 #include "ui/aura/client/focus_client.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 82 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
83 window_->set_owned_by_parent(false); 83 window_->set_owned_by_parent(false);
84 } 84 }
85 85
86 virtual ~TestKeyboardControllerProxy() { 86 virtual ~TestKeyboardControllerProxy() {
87 // Destroy the window before the delegate. 87 // Destroy the window before the delegate.
88 window_.reset(); 88 window_.reset();
89 } 89 }
90 90
91 // Overridden from KeyboardControllerProxy: 91 // Overridden from KeyboardControllerProxy:
92 virtual bool HasKeyboardWindow() const OVERRIDE { return true; }
92 virtual aura::Window* GetKeyboardWindow() OVERRIDE { return window_.get(); } 93 virtual aura::Window* GetKeyboardWindow() OVERRIDE { return window_.get(); }
93 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; } 94 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { return NULL; }
94 virtual ui::InputMethod* GetInputMethod() OVERRIDE { 95 virtual ui::InputMethod* GetInputMethod() OVERRIDE {
95 return input_method_.get(); 96 return input_method_.get();
96 } 97 }
97 virtual void RequestAudioInput(content::WebContents* web_contents, 98 virtual void RequestAudioInput(content::WebContents* web_contents,
98 const content::MediaStreamRequest& request, 99 const content::MediaStreamRequest& request,
99 const content::MediaResponseCallback& callback) OVERRIDE { return; } 100 const content::MediaResponseCallback& callback) OVERRIDE { return; }
100 101
101 private: 102 private:
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 SetFocus(&input_client); 611 SetFocus(&input_client);
611 EXPECT_TRUE(keyboard_container->IsVisible()); 612 EXPECT_TRUE(keyboard_container->IsVisible());
612 613
613 SetFocus(&no_input_client); 614 SetFocus(&no_input_client);
614 // Keyboard should not hide itself after lost focus. 615 // Keyboard should not hide itself after lost focus.
615 EXPECT_TRUE(keyboard_container->IsVisible()); 616 EXPECT_TRUE(keyboard_container->IsVisible());
616 EXPECT_FALSE(WillHideKeyboard()); 617 EXPECT_FALSE(WillHideKeyboard());
617 } 618 }
618 619
619 } // namespace keyboard 620 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/keyboard/keyboard_controller_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698