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

Side by Side Diff: chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc

Issue 1550983003: Give the ChromeVox Panel an extension view type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VIEW_TYPE_COMPONENT Created 4 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/speech/chrome_speech_recognition_manager_delegate.h" 5 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 return; 417 return;
418 } 418 }
419 419
420 #if defined(ENABLE_EXTENSIONS) 420 #if defined(ENABLE_EXTENSIONS)
421 WebContents* web_contents = WebContents::FromRenderViewHost(render_view_host); 421 WebContents* web_contents = WebContents::FromRenderViewHost(render_view_host);
422 extensions::ViewType view_type = extensions::GetViewType(web_contents); 422 extensions::ViewType view_type = extensions::GetViewType(web_contents);
423 423
424 if (view_type == extensions::VIEW_TYPE_TAB_CONTENTS || 424 if (view_type == extensions::VIEW_TYPE_TAB_CONTENTS ||
425 view_type == extensions::VIEW_TYPE_APP_WINDOW || 425 view_type == extensions::VIEW_TYPE_APP_WINDOW ||
426 view_type == extensions::VIEW_TYPE_LAUNCHER_PAGE || 426 view_type == extensions::VIEW_TYPE_LAUNCHER_PAGE ||
427 view_type == extensions::VIEW_TYPE_VIRTUAL_KEYBOARD || 427 view_type == extensions::VIEW_TYPE_COMPONENT ||
428 view_type == extensions::VIEW_TYPE_EXTENSION_POPUP || 428 view_type == extensions::VIEW_TYPE_EXTENSION_POPUP ||
429 view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) { 429 view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
430 // If it is a tab, we can check for permission. For apps, this means 430 // If it is a tab, we can check for permission. For apps, this means
431 // manifest would be checked for permission. 431 // manifest would be checked for permission.
432 allowed = true; 432 allowed = true;
433 check_permission = true; 433 check_permission = true;
434 } 434 }
435 #else 435 #else
436 // Otherwise this should be a regular tab contents. 436 // Otherwise this should be a regular tab contents.
437 allowed = true; 437 allowed = true;
438 check_permission = true; 438 check_permission = true;
439 #endif 439 #endif
440 440
441 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 441 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
442 base::Bind(callback, check_permission, allowed)); 442 base::Bind(callback, check_permission, allowed));
443 } 443 }
444 444
445 } // namespace speech 445 } // namespace speech
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | chrome/browser/ui/ash/chrome_keyboard_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698