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

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: Rebase Created 4 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
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 DCHECK_NE(TYPE_APP_PANEL, type); 63 DCHECK_NE(TYPE_APP_PANEL, type);
59 } 64 }
60 65
61 ExtensionAppWindowLauncherItemController:: 66 ExtensionAppWindowLauncherItemController::
62 ~ExtensionAppWindowLauncherItemController() {} 67 ~ExtensionAppWindowLauncherItemController() {}
63 68
64 void ExtensionAppWindowLauncherItemController::AddAppWindow( 69 void ExtensionAppWindowLauncherItemController::AddAppWindow(
65 extensions::AppWindow* app_window) { 70 extensions::AppWindow* app_window) {
66 DCHECK(!app_window->window_type_is_panel()); 71 DCHECK(!app_window->window_type_is_panel());
67 DCHECK(window_to_app_window_.find(app_window->GetBaseWindow()) == 72 DCHECK(window_to_app_window_.find(app_window->GetBaseWindow()) ==
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (windows().empty()) 119 if (windows().empty())
115 return kNoAction; 120 return kNoAction;
116 return AppWindowLauncherItemController::ItemSelected(event); 121 return AppWindowLauncherItemController::ItemSelected(event);
117 } 122 }
118 123
119 ash::ShelfMenuModel* 124 ash::ShelfMenuModel*
120 ExtensionAppWindowLauncherItemController::CreateApplicationMenu( 125 ExtensionAppWindowLauncherItemController::CreateApplicationMenu(
121 int event_flags) { 126 int event_flags) {
122 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 127 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
123 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698