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

Side by Side Diff: chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
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/ui/virtual_keyboard/virtual_keyboard_manager.h" 5 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_event_router.h" 9 #include "chrome/browser/extensions/extension_event_router.h"
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" 10 #include "chrome/browser/extensions/extension_function_dispatcher.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 target_(NULL), 178 target_(NULL),
179 keyboard_height_(kDefaultKeyboardHeight) { 179 keyboard_height_(kDefaultKeyboardHeight) {
180 180
181 // Initialize the widget first. 181 // Initialize the widget first.
182 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 182 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
183 params.keep_on_top = true; 183 params.keep_on_top = true;
184 params.transparent = true; 184 params.transparent = true;
185 params.bounds = GetKeyboardPosition(keyboard_height_); 185 params.bounds = GetKeyboardPosition(keyboard_height_);
186 Init(params); 186 Init(params);
187 #if defined(USE_AURA) 187 #if defined(USE_AURA)
188 aura_shell::Shell::GetInstance()->GetContainer( 188 ash::Shell::GetInstance()->GetContainer(
189 aura_shell::internal::kShellWindowId_MenusAndTooltipsContainer)-> 189 ash::internal::kShellWindowId_MenusAndTooltipsContainer)->
190 AddChild(GetNativeView()); 190 AddChild(GetNativeView());
191 #endif 191 #endif
192 192
193 // Setup the DOM view to host the keyboard. 193 // Setup the DOM view to host the keyboard.
194 Profile* profile = ProfileManager::GetDefaultProfile(); 194 Profile* profile = ProfileManager::GetDefaultProfile();
195 dom_view_->Init(profile, 195 dom_view_->Init(profile,
196 SiteInstance::CreateSiteInstanceForURL(profile, keyboard_url_)); 196 SiteInstance::CreateSiteInstanceForURL(profile, keyboard_url_));
197 dom_view_->LoadURL(keyboard_url_); 197 dom_view_->LoadURL(keyboard_url_);
198 dom_view_->SetVisible(true); 198 dom_view_->SetVisible(true);
199 SetContentsView(dom_view_); 199 SetContentsView(dom_view_);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 537
538 void VirtualKeyboardManager::OnWidgetClosing(views::Widget* widget) { 538 void VirtualKeyboardManager::OnWidgetClosing(views::Widget* widget) {
539 DCHECK_EQ(keyboard_, widget); 539 DCHECK_EQ(keyboard_, widget);
540 keyboard_ = NULL; 540 keyboard_ = NULL;
541 } 541 }
542 542
543 // static 543 // static
544 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() { 544 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() {
545 return Singleton<VirtualKeyboardManager>::get(); 545 return Singleton<VirtualKeyboardManager>::get();
546 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698