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

Side by Side Diff: chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.cc

Issue 2484413002: Enhance chrome.app.window API with title property
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ash/launcher/extension_app_window_launcher_item_cont roller.h" 5 #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_cont roller.h"
6 6
7 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/wm/window_state_aura.h" 8 #include "ash/wm/window_state_aura.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return gfx::Image(gfx::ImageSkia::CreateFrom1xBitmap(bmp)); 46 return gfx::Image(gfx::ImageSkia::CreateFrom1xBitmap(bmp));
47 } 47 }
48 48
49 } // namespace 49 } // namespace
50 50
51 ExtensionAppWindowLauncherItemController:: 51 ExtensionAppWindowLauncherItemController::
52 ExtensionAppWindowLauncherItemController( 52 ExtensionAppWindowLauncherItemController(
53 Type type, 53 Type type,
54 const std::string& app_id, 54 const std::string& app_id,
55 const std::string& launch_id, 55 const std::string& launch_id,
56 const std::string& title,
56 ChromeLauncherController* controller) 57 ChromeLauncherController* controller)
57 : AppWindowLauncherItemController(type, app_id, launch_id, controller) {} 58 : AppWindowLauncherItemController(type,
59 app_id,
60 launch_id,
61 title,
62 controller) {}
58 63
59 ExtensionAppWindowLauncherItemController:: 64 ExtensionAppWindowLauncherItemController::
60 ~ExtensionAppWindowLauncherItemController() {} 65 ~ExtensionAppWindowLauncherItemController() {}
61 66
62 void ExtensionAppWindowLauncherItemController::AddAppWindow( 67 void ExtensionAppWindowLauncherItemController::AddAppWindow(
63 extensions::AppWindow* app_window) { 68 extensions::AppWindow* app_window) {
64 if (app_window->window_type_is_panel() && type() != TYPE_APP_PANEL) 69 if (app_window->window_type_is_panel() && type() != TYPE_APP_PANEL)
65 LOG(ERROR) << "AppWindow of type Panel added to non-panel launcher item"; 70 LOG(ERROR) << "AppWindow of type Panel added to non-panel launcher item";
66 DCHECK(window_to_app_window_.find(app_window->GetBaseWindow()) == 71 DCHECK(window_to_app_window_.find(app_window->GetBaseWindow()) ==
67 window_to_app_window_.end()); 72 window_to_app_window_.end());
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (type() == TYPE_APP_PANEL) 163 if (type() == TYPE_APP_PANEL)
159 return true; 164 return true;
160 return AppWindowLauncherItemController::IsDraggable(); 165 return AppWindowLauncherItemController::IsDraggable();
161 } 166 }
162 167
163 bool ExtensionAppWindowLauncherItemController::ShouldShowTooltip() { 168 bool ExtensionAppWindowLauncherItemController::ShouldShowTooltip() {
164 if (type() == TYPE_APP_PANEL && IsVisible()) 169 if (type() == TYPE_APP_PANEL && IsVisible())
165 return false; 170 return false;
166 return AppWindowLauncherItemController::ShouldShowTooltip(); 171 return AppWindowLauncherItemController::ShouldShowTooltip();
167 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698