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

Side by Side Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 11147037: Add a 'hidden' option to chrome.app.window.create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename 'createHidden' to 'hidden' for less redundancy Created 8 years, 2 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/ui/views/extensions/shell_window_views.h" 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); 345 GetWidget()->GetTopLevelWidget()->GetNativeWindow());
346 #endif 346 #endif
347 347
348 extension_keybinding_registry_.reset( 348 extension_keybinding_registry_.reset(
349 new ExtensionKeybindingRegistryViews(shell_window_->profile(), 349 new ExtensionKeybindingRegistryViews(shell_window_->profile(),
350 window_->GetFocusManager(), 350 window_->GetFocusManager(),
351 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 351 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
352 shell_window_)); 352 shell_window_));
353 353
354 OnViewWasResized(); 354 OnViewWasResized();
355
356 window_->Show();
357 } 355 }
358 356
359 views::View* ShellWindowViews::GetInitiallyFocusedView() { 357 views::View* ShellWindowViews::GetInitiallyFocusedView() {
360 return web_view_; 358 return web_view_;
361 } 359 }
362 360
363 bool ShellWindowViews::ShouldDescendIntoChildForEventHandling( 361 bool ShellWindowViews::ShouldDescendIntoChildForEventHandling(
364 gfx::NativeView child, 362 gfx::NativeView child,
365 const gfx::Point& location) { 363 const gfx::Point& location) {
366 #if defined(USE_AURA) 364 #if defined(USE_AURA)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 445
448 window_->Show(); 446 window_->Show();
449 } 447 }
450 448
451 void ShellWindowViews::ShowInactive() { 449 void ShellWindowViews::ShowInactive() {
452 if (window_->IsVisible()) 450 if (window_->IsVisible())
453 return; 451 return;
454 window_->ShowInactive(); 452 window_->ShowInactive();
455 } 453 }
456 454
455 void ShellWindowViews::Hide() {
456 window_->Hide();
457 }
458
457 void ShellWindowViews::Close() { 459 void ShellWindowViews::Close() {
458 window_->Close(); 460 window_->Close();
459 } 461 }
460 462
461 void ShellWindowViews::Activate() { 463 void ShellWindowViews::Activate() {
462 window_->Activate(); 464 window_->Activate();
463 } 465 }
464 466
465 void ShellWindowViews::Deactivate() { 467 void ShellWindowViews::Deactivate() {
466 window_->Deactivate(); 468 window_->Deactivate();
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 ui::WindowShowState show_state) { 689 ui::WindowShowState show_state) {
688 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); 690 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state);
689 shell_window_->SaveWindowPosition(); 691 shell_window_->SaveWindowPosition();
690 } 692 }
691 693
692 // static 694 // static
693 NativeShellWindow* NativeShellWindow::Create( 695 NativeShellWindow* NativeShellWindow::Create(
694 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 696 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
695 return new ShellWindowViews(shell_window, params); 697 return new ShellWindowViews(shell_window, params);
696 } 698 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698