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

Side by Side Diff: chrome/browser/ui/views/accessibility/invert_bubble_view.cc

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/accessibility/invert_bubble_view.h" 5 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 dark_theme_ = new views::Link(l10n_util::GetStringUTF16(IDS_DARK_THEME)); 100 dark_theme_ = new views::Link(l10n_util::GetStringUTF16(IDS_DARK_THEME));
101 dark_theme_->SetFontList(original_font_list); 101 dark_theme_->SetFontList(original_font_list);
102 dark_theme_->set_listener(this); 102 dark_theme_->set_listener(this);
103 103
104 close_ = new views::Link(l10n_util::GetStringUTF16(IDS_CLOSE)); 104 close_ = new views::Link(l10n_util::GetStringUTF16(IDS_CLOSE));
105 close_->SetFontList(original_font_list); 105 close_->SetFontList(original_font_list);
106 close_->set_listener(this); 106 close_->set_listener(this);
107 107
108 views::GridLayout* layout = views::GridLayout::CreatePanel(this); 108 views::GridLayout* layout = views::GridLayout::CreatePanel(this);
109 SetLayoutManager(layout);
110 109
111 views::ColumnSet* columns = layout->AddColumnSet(0); 110 views::ColumnSet* columns = layout->AddColumnSet(0);
112 for (int i = 0; i < 4; i++) { 111 for (int i = 0; i < 4; i++) {
113 columns->AddColumn(views::GridLayout::LEADING, 112 columns->AddColumn(views::GridLayout::LEADING,
114 views::GridLayout::LEADING, 0, 113 views::GridLayout::LEADING, 0,
115 views::GridLayout::USE_PREF, 0, 0); 114 views::GridLayout::USE_PREF, 0, 0);
116 } 115 }
117 116
118 layout->StartRow(0, 0); 117 layout->StartRow(0, 0);
119 layout->AddView(title, 4, 1); 118 layout->AddView(title, 4, 1);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 views::View* anchor = browser_view->toolbar()->app_menu_button(); 171 views::View* anchor = browser_view->toolbar()->app_menu_button();
173 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && 172 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() &&
174 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { 173 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) {
175 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); 174 pref_service->SetBoolean(prefs::kInvertNotificationShown, true);
176 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); 175 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor);
177 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show(); 176 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show();
178 } 177 }
179 } 178 }
180 179
181 } // namespace chrome 180 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698