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

Side by Side Diff: chrome/browser/extensions/extension_input_api.cc

Issue 8598024: Now that we are doing a hard-cut-over to Aura, remove a bunch of *Views based classes that are ob... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/extensions/extension_input_api.h" 5 #include "chrome/browser/extensions/extension_input_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 (key_identifier.substr(2).find_first_not_of("0123456789abcdefABCDEF") == 67 (key_identifier.substr(2).find_first_not_of("0123456789abcdefABCDEF") ==
68 std::string::npos)) { 68 std::string::npos)) {
69 const bool result = 69 const bool result =
70 base::HexStringToInt(key_identifier.substr(2), &character); 70 base::HexStringToInt(key_identifier.substr(2), &character);
71 DCHECK(result) << key_identifier; 71 DCHECK(result) << key_identifier;
72 } 72 }
73 return character; 73 return character;
74 } 74 }
75 75
76 views::Widget* GetTopLevelWidget(Browser* browser) { 76 views::Widget* GetTopLevelWidget(Browser* browser) {
77 if (views::ViewsDelegate::views_delegate) {
78 views::View* view = views::ViewsDelegate::views_delegate->
79 GetDefaultParentView();
80 if (view)
81 return view->GetWidget();
82 }
83
84 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) 77 #if defined(OS_CHROMEOS) && defined(TOUCH_UI)
85 chromeos::LoginDisplayHost* host = 78 chromeos::LoginDisplayHost* host =
86 chromeos::BaseLoginDisplayHost::default_host(); 79 chromeos::BaseLoginDisplayHost::default_host();
87 if (host) 80 if (host)
88 return views::Widget::GetWidgetForNativeWindow(host->GetNativeWindow()); 81 return views::Widget::GetWidgetForNativeWindow(host->GetNativeWindow());
89 #endif 82 #endif
90 83
91 if (!browser) 84 if (!browser)
92 return NULL; 85 return NULL;
93 86
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 int stroke_count = 0; // zero means 'clear all strokes'. 229 int stroke_count = 0; // zero means 'clear all strokes'.
237 if (HasOptionalArgument(0)) { 230 if (HasOptionalArgument(0)) {
238 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &stroke_count)); 231 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &stroke_count));
239 EXTENSION_FUNCTION_VALIDATE(stroke_count >= 0); 232 EXTENSION_FUNCTION_VALIDATE(stroke_count >= 0);
240 } 233 }
241 chromeos::input_method::InputMethodManager::GetInstance()-> 234 chromeos::input_method::InputMethodManager::GetInstance()->
242 CancelHandwritingStrokes(stroke_count); 235 CancelHandwritingStrokes(stroke_count);
243 return true; 236 return true;
244 } 237 }
245 #endif 238 #endif
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.cc ('k') | chrome/browser/renderer_host/render_widget_host_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698