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

Side by Side Diff: chrome/browser/ui/views/tabs/base_tab.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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/tabs/base_tab.h" 5 #include "chrome/browser/ui/views/tabs/base_tab.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Explicitly mark midle-mouse clicks as non-handled to ensure the tab 51 // Explicitly mark midle-mouse clicks as non-handled to ensure the tab
52 // sees them. 52 // sees them.
53 return event.IsOnlyMiddleMouseButton() ? false : handled; 53 return event.IsOnlyMiddleMouseButton() ? false : handled;
54 } 54 }
55 55
56 // We need to let the parent know about mouse state so that it 56 // We need to let the parent know about mouse state so that it
57 // can highlight itself appropriately. Note that Exit events 57 // can highlight itself appropriately. Note that Exit events
58 // fire before Enter events, so this works. 58 // fire before Enter events, so this works.
59 virtual void OnMouseEntered(const views::MouseEvent& event) { 59 virtual void OnMouseEntered(const views::MouseEvent& event) {
60 CustomButton::OnMouseEntered(event); 60 CustomButton::OnMouseEntered(event);
61 GetParent()->OnMouseEntered(event); 61 parent()->OnMouseEntered(event);
62 } 62 }
63 63
64 virtual void OnMouseExited(const views::MouseEvent& event) { 64 virtual void OnMouseExited(const views::MouseEvent& event) {
65 CustomButton::OnMouseExited(event); 65 CustomButton::OnMouseExited(event);
66 GetParent()->OnMouseExited(event); 66 parent()->OnMouseExited(event);
67 } 67 }
68 68
69 private: 69 private:
70 DISALLOW_COPY_AND_ASSIGN(TabCloseButton); 70 DISALLOW_COPY_AND_ASSIGN(TabCloseButton);
71 }; 71 };
72 72
73 } // namespace 73 } // namespace
74 74
75 // static 75 // static
76 gfx::Font* BaseTab::font_ = NULL; 76 gfx::Font* BaseTab::font_ = NULL;
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // static 468 // static
469 void BaseTab::InitResources() { 469 void BaseTab::InitResources() {
470 static bool initialized = false; 470 static bool initialized = false;
471 if (!initialized) { 471 if (!initialized) {
472 initialized = true; 472 initialized = true;
473 font_ = new gfx::Font( 473 font_ = new gfx::Font(
474 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); 474 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont));
475 font_height_ = font_->GetHeight(); 475 font_height_ = font_->GetHeight();
476 } 476 }
477 } 477 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/options/simple_content_exceptions_view.cc ('k') | chrome/browser/ui/views/tabs/base_tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698