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

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

Issue 2753813003: Fix theme change paint issue on linux. (Closed)
Patch Set: Created 3 years, 9 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
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/frame/browser_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void BrowserFrame::OnNativeWidgetWorkspaceChanged() { 223 void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
224 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); 224 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
225 #if !defined(OS_CHROMEOS) && defined(USE_X11) 225 #if !defined(OS_CHROMEOS) && defined(USE_X11)
226 BrowserList::MoveBrowsersInWorkspaceToFront( 226 BrowserList::MoveBrowsersInWorkspaceToFront(
227 views::X11DesktopHandler::get()->GetWorkspace()); 227 views::X11DesktopHandler::get()->GetWorkspace());
228 #endif 228 #endif
229 Widget::OnNativeWidgetWorkspaceChanged(); 229 Widget::OnNativeWidgetWorkspaceChanged();
230 } 230 }
231 231
232 void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
233 views::Widget::OnNativeThemeUpdated(observed_theme);
234 browser_view_->NativeThemeUpdated(observed_theme);
235 }
236
232 void BrowserFrame::ShowContextMenuForView(views::View* source, 237 void BrowserFrame::ShowContextMenuForView(views::View* source,
233 const gfx::Point& p, 238 const gfx::Point& p,
234 ui::MenuSourceType source_type) { 239 ui::MenuSourceType source_type) {
235 if (chrome::IsRunningInForcedAppMode()) 240 if (chrome::IsRunningInForcedAppMode())
236 return; 241 return;
237 242
238 // Only show context menu if point is in unobscured parts of browser, i.e. 243 // Only show context menu if point is in unobscured parts of browser, i.e.
239 // if NonClientHitTest returns : 244 // if NonClientHitTest returns :
240 // - HTCAPTION: in title bar or unobscured part of tabstrip 245 // - HTCAPTION: in title bar or unobscured part of tabstrip
241 // - HTNOWHERE: as the name implies. 246 // - HTNOWHERE: as the name implies.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return menu_model_builder_->menu_model(); 278 return menu_model_builder_->menu_model();
274 } 279 }
275 280
276 views::View* BrowserFrame::GetNewAvatarMenuButton() { 281 views::View* BrowserFrame::GetNewAvatarMenuButton() {
277 return browser_frame_view_->GetProfileSwitcherView(); 282 return browser_frame_view_->GetProfileSwitcherView();
278 } 283 }
279 284
280 void BrowserFrame::OnMenuClosed() { 285 void BrowserFrame::OnMenuClosed() {
281 menu_runner_.reset(); 286 menu_runner_.reset();
282 } 287 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698