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

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

Issue 11818065: OK, here's john's patch plus my sync stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Redisable PlatformAppBrowserTest.WebContentsHasFocus on aura Created 7 years, 10 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/native_app_window_views.h" 5 #include "chrome/browser/ui/views/extensions/native_app_window_views.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.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/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically 114 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically
115 // could plumb context through to here in some cases. 115 // could plumb context through to here in some cases.
116 init_params.top_level = true; 116 init_params.top_level = true;
117 window_->Init(init_params); 117 window_->Init(init_params);
118 gfx::Rect window_bounds = create_params.bounds; 118 gfx::Rect window_bounds = create_params.bounds;
119 window_bounds.Inset(-GetFrameInsets()); 119 window_bounds.Inset(-GetFrameInsets());
120 // Center window if no position was specified. 120 // Center window if no position was specified.
121 if (create_params.bounds.x() == INT_MIN || 121 if (create_params.bounds.x() == INT_MIN ||
122 create_params.bounds.y() == INT_MIN) { 122 create_params.bounds.y() == INT_MIN) {
123 window_->CenterWindow(window_bounds.size()); 123 window_->CenterWindow(window_bounds.size());
124 } else { 124 } else if (!window_bounds.IsEmpty()) {
125 window_->SetBounds(window_bounds); 125 window_->SetBounds(window_bounds);
126 } 126 }
127 127
128 // Register accelarators supported by app windows. 128 // Register accelarators supported by app windows.
129 // TODO(jeremya/stevenjb): should these be registered for panels too? 129 // TODO(jeremya/stevenjb): should these be registered for panels too?
130 views::FocusManager* focus_manager = GetFocusManager(); 130 views::FocusManager* focus_manager = GetFocusManager();
131 const std::map<ui::Accelerator, int>& accelerator_table = 131 const std::map<ui::Accelerator, int>& accelerator_table =
132 GetAcceleratorTable(); 132 GetAcceleratorTable();
133 for (std::map<ui::Accelerator, int>::const_iterator iter = 133 for (std::map<ui::Accelerator, int>::const_iterator iter =
134 accelerator_table.begin(); 134 accelerator_table.begin();
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 } 585 }
586 586
587 //------------------------------------------------------------------------------ 587 //------------------------------------------------------------------------------
588 // NativeAppWindow::Create 588 // NativeAppWindow::Create
589 589
590 // static 590 // static
591 NativeAppWindow* NativeAppWindow::Create( 591 NativeAppWindow* NativeAppWindow::Create(
592 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 592 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
593 return new NativeAppWindowViews(shell_window, params); 593 return new NativeAppWindowViews(shell_window, params);
594 } 594 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_extension_browsertest.cc ('k') | chrome/browser/ui/views/location_bar/star_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698