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

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

Issue 13139004: Deprecate Browser::TYPE_PANEL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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
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/extensions/browser_extension_window_controller.h" 5 #include "chrome/browser/extensions/browser_extension_window_controller.h"
6 6
7 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 7 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
8 #include "chrome/browser/extensions/extension_tab_util.h" 8 #include "chrome/browser/extensions/extension_tab_util.h"
9 #include "chrome/browser/extensions/window_controller_list.h" 9 #include "chrome/browser/extensions/window_controller_list.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 16 matching lines...) Expand all
27 27
28 int BrowserExtensionWindowController::GetWindowId() const { 28 int BrowserExtensionWindowController::GetWindowId() const {
29 return static_cast<int>(browser_->session_id().id()); 29 return static_cast<int>(browser_->session_id().id());
30 } 30 }
31 31
32 namespace keys = extensions::tabs_constants; 32 namespace keys = extensions::tabs_constants;
33 33
34 std::string BrowserExtensionWindowController::GetWindowTypeText() const { 34 std::string BrowserExtensionWindowController::GetWindowTypeText() const {
35 if (browser_->is_type_popup()) 35 if (browser_->is_type_popup())
36 return keys::kWindowTypeValuePopup; 36 return keys::kWindowTypeValuePopup;
37 if (browser_->is_type_panel())
38 return keys::kWindowTypeValuePanel;
39 if (browser_->is_app()) 37 if (browser_->is_app())
40 return keys::kWindowTypeValueApp; 38 return keys::kWindowTypeValueApp;
41 return keys::kWindowTypeValueNormal; 39 return keys::kWindowTypeValueNormal;
42 } 40 }
43 41
44 base::DictionaryValue* 42 base::DictionaryValue*
45 BrowserExtensionWindowController::CreateWindowValue() const { 43 BrowserExtensionWindowController::CreateWindowValue() const {
46 DictionaryValue* result = extensions::WindowController::CreateWindowValue(); 44 DictionaryValue* result = extensions::WindowController::CreateWindowValue();
47 return result; 45 return result;
48 } 46 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 83
86 Browser* BrowserExtensionWindowController::GetBrowser() const { 84 Browser* BrowserExtensionWindowController::GetBrowser() const {
87 return browser_; 85 return browser_;
88 } 86 }
89 87
90 bool BrowserExtensionWindowController::IsVisibleToExtension( 88 bool BrowserExtensionWindowController::IsVisibleToExtension(
91 const extensions::Extension* extension) const { 89 const extensions::Extension* extension) const {
92 // Platform apps can only see their own windows. 90 // Platform apps can only see their own windows.
93 return !extension->is_platform_app(); 91 return !extension->is_platform_app();
94 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_test.cc ('k') | chrome/browser/extensions/window_open_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698