OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/apps/chrome_native_app_window_views.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" |
6 | 6 |
7 #include "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/app_mode/app_mode_utils.h" | 9 #include "chrome/browser/app_mode/app_mode_utils.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 OnBeforePanelWidgetInit(use_default_bounds, ¶ms, widget()); | 225 OnBeforePanelWidgetInit(use_default_bounds, ¶ms, widget()); |
226 widget()->Init(params); | 226 widget()->Init(params); |
227 widget()->set_focus_on_creation(create_params.focused); | 227 widget()->set_focus_on_creation(create_params.focused); |
228 } | 228 } |
229 | 229 |
230 views::NonClientFrameView* | 230 views::NonClientFrameView* |
231 ChromeNativeAppWindowViews::CreateStandardDesktopAppFrame() { | 231 ChromeNativeAppWindowViews::CreateStandardDesktopAppFrame() { |
232 return views::WidgetDelegateView::CreateNonClientFrameView(widget()); | 232 return views::WidgetDelegateView::CreateNonClientFrameView(widget()); |
233 } | 233 } |
234 | 234 |
235 apps::AppWindowFrameView* | |
236 ChromeNativeAppWindowViews::CreateNonStandardAppFrame() { | |
237 apps::AppWindowFrameView* frame = | |
238 new apps::AppWindowFrameView(widget(), this, has_frame_color_, | |
239 active_frame_color_, inactive_frame_color_); | |
240 frame->Init(); | |
241 return frame; | |
242 } | |
243 | |
244 // ui::BaseWindow implementation. | 235 // ui::BaseWindow implementation. |
245 | 236 |
246 gfx::Rect ChromeNativeAppWindowViews::GetRestoredBounds() const { | 237 gfx::Rect ChromeNativeAppWindowViews::GetRestoredBounds() const { |
247 return widget()->GetRestoredBounds(); | 238 return widget()->GetRestoredBounds(); |
248 } | 239 } |
249 | 240 |
250 ui::WindowShowState ChromeNativeAppWindowViews::GetRestoredState() const { | 241 ui::WindowShowState ChromeNativeAppWindowViews::GetRestoredState() const { |
251 if (IsMaximized()) | 242 if (IsMaximized()) |
252 return ui::SHOW_STATE_MAXIMIZED; | 243 return ui::SHOW_STATE_MAXIMIZED; |
253 if (IsFullscreen()) | 244 if (IsFullscreen()) |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 InitializePanelWindow(create_params); | 384 InitializePanelWindow(create_params); |
394 } else { | 385 } else { |
395 InitializeDefaultWindow(create_params); | 386 InitializeDefaultWindow(create_params); |
396 } | 387 } |
397 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 388 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
398 Profile::FromBrowserContext(app_window->browser_context()), | 389 Profile::FromBrowserContext(app_window->browser_context()), |
399 widget()->GetFocusManager(), | 390 widget()->GetFocusManager(), |
400 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 391 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
401 NULL)); | 392 NULL)); |
402 } | 393 } |
OLD | NEW |