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

Side by Side Diff: chrome/browser/ui/views/options/options_page_view.cc

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/options_page_view.h" 5 #include "chrome/browser/ui/views/options/options_page_view.h"
6 6
7 #include "chrome/browser/metrics/user_metrics.h" 7 #include "chrome/browser/metrics/user_metrics.h"
8 #include "views/widget/widget.h" 8 #include "views/widget/widget.h"
9 9
10 /////////////////////////////////////////////////////////////////////////////// 10 ///////////////////////////////////////////////////////////////////////////////
11 // OptionsPageView 11 // OptionsPageView
12 12
13 OptionsPageView::OptionsPageView(Profile* profile) 13 OptionsPageView::OptionsPageView(Profile* profile)
14 : OptionsPageBase(profile), 14 : OptionsPageBase(profile),
15 initialized_(false) { 15 initialized_(false) {
16 } 16 }
17 17
18 OptionsPageView::~OptionsPageView() { 18 OptionsPageView::~OptionsPageView() {
19 } 19 }
20 20
21 /////////////////////////////////////////////////////////////////////////////// 21 ///////////////////////////////////////////////////////////////////////////////
22 // OptionsPageView, views::View overrides: 22 // OptionsPageView, views::View overrides:
23 23
24 bool OptionsPageView::CanClose() const {
25 return true;
26 }
27
24 void OptionsPageView::ViewHierarchyChanged(bool is_add, 28 void OptionsPageView::ViewHierarchyChanged(bool is_add,
25 views::View* parent, 29 views::View* parent,
26 views::View* child) { 30 views::View* child) {
27 if (!initialized_ && is_add && GetWidget()) { 31 if (!initialized_ && is_add && GetWidget()) {
28 // It is important that this only get done _once_ otherwise we end up 32 // It is important that this only get done _once_ otherwise we end up
29 // duplicating the view hierarchy when tabs are switched. 33 // duplicating the view hierarchy when tabs are switched.
30 initialized_ = true; 34 initialized_ = true;
31 InitControlLayout(); 35 InitControlLayout();
32 NotifyPrefChanged(NULL); 36 NotifyPrefChanged(NULL);
33 } 37 }
34 } 38 }
35 39
36 AccessibilityTypes::Role OptionsPageView::GetAccessibleRole() { 40 AccessibilityTypes::Role OptionsPageView::GetAccessibleRole() {
37 return AccessibilityTypes::ROLE_PAGETAB; 41 return AccessibilityTypes::ROLE_PAGETAB;
38 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698