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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc

Issue 310193002: linux_aura: Theoretical crash for full screen transition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame/opaque_browser_frame_view_layout.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/profiles/profiles_state.h" 8 #include "chrome/browser/profiles/profiles_state.h"
9 #include "chrome/browser/ui/views/profiles/avatar_label.h" 9 #include "chrome/browser/ui/views/profiles/avatar_label.h"
10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" 10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 buttons_not_shown.begin(); it != buttons_not_shown.end(); ++it) { 306 buttons_not_shown.begin(); it != buttons_not_shown.end(); ++it) {
307 HideButton(*it); 307 HideButton(*it);
308 } 308 }
309 } 309 }
310 310
311 void OpaqueBrowserFrameViewLayout::LayoutTitleBar(views::View* host) { 311 void OpaqueBrowserFrameViewLayout::LayoutTitleBar(views::View* host) {
312 bool use_hidden_icon_location = true; 312 bool use_hidden_icon_location = true;
313 313
314 int size = delegate_->GetIconSize(); 314 int size = delegate_->GetIconSize();
315 int frame_thickness = FrameBorderThickness(false); 315 int frame_thickness = FrameBorderThickness(false);
316 bool should_show_icon = delegate_->ShouldShowWindowIcon(); 316 bool should_show_icon = delegate_->ShouldShowWindowIcon() && window_icon_;
317 bool should_show_title = delegate_->ShouldShowWindowTitle(); 317 bool should_show_title = delegate_->ShouldShowWindowTitle() && window_title_;
318 318
319 if (should_show_icon || should_show_title) { 319 if (should_show_icon || should_show_title) {
320 use_hidden_icon_location = false; 320 use_hidden_icon_location = false;
321 321
322 // Our frame border has a different "3D look" than Windows'. Theirs has 322 // Our frame border has a different "3D look" than Windows'. Theirs has
323 // a more complex gradient on the top that they push their icon/title 323 // a more complex gradient on the top that they push their icon/title
324 // below; then the maximized window cuts this off and the icon/title are 324 // below; then the maximized window cuts this off and the icon/title are
325 // centered in the remaining space. Because the apparent shape of our 325 // centered in the remaining space. Because the apparent shape of our
326 // border is simpler, using the same positioning makes things look 326 // border is simpler, using the same positioning makes things look
327 // slightly uncentered with restored windows, so when the window is 327 // slightly uncentered with restored windows, so when the window is
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 685
686 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host, 686 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host,
687 views::View* view) { 687 views::View* view) {
688 SetView(view->id(), view); 688 SetView(view->id(), view);
689 } 689 }
690 690
691 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host, 691 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host,
692 views::View* view) { 692 views::View* view) {
693 SetView(view->id(), NULL); 693 SetView(view->id(), NULL);
694 } 694 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698