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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_frame_view.cc

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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/panels/panel_browser_frame_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/ui/panels/panel.h" 10 #include "chrome/browser/ui/panels/panel.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 l10n_util::GetStringUTF16(IDS_TOOLTIP_CLOSE_TAB)); 270 l10n_util::GetStringUTF16(IDS_TOOLTIP_CLOSE_TAB));
271 close_button_->SetAccessibleName( 271 close_button_->SetAccessibleName(
272 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); 272 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
273 AddChildView(close_button_); 273 AddChildView(close_button_);
274 274
275 title_icon_ = new TabIconView(this); 275 title_icon_ = new TabIconView(this);
276 title_icon_->set_is_light(true); 276 title_icon_->set_is_light(true);
277 AddChildView(title_icon_); 277 AddChildView(title_icon_);
278 title_icon_->Update(); 278 title_icon_->Update();
279 279
280 title_label_ = new views::Label(string16()); 280 title_label_ = new views::Label(std::wstring());
281 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 281 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
282 AddChildView(title_label_); 282 AddChildView(title_label_);
283 283
284 mouse_watcher_.reset(new MouseWatcher(this)); 284 mouse_watcher_.reset(new MouseWatcher(this));
285 } 285 }
286 286
287 PanelBrowserFrameView::~PanelBrowserFrameView() { 287 PanelBrowserFrameView::~PanelBrowserFrameView() {
288 } 288 }
289 289
290 gfx::Rect PanelBrowserFrameView::GetBoundsForTabStrip( 290 gfx::Rect PanelBrowserFrameView::GetBoundsForTabStrip(
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 client_area_bottom); 683 client_area_bottom);
684 684
685 // Draw the left edge. 685 // Draw the left edge.
686 canvas->TileImageInt( 686 canvas->TileImageInt(
687 *(client_edges.left), 687 *(client_edges.left),
688 client_view_bounds_.x() - client_edges.left->width(), 688 client_view_bounds_.x() - client_edges.left->width(),
689 client_area_top, client_edges.left->width(), client_area_height); 689 client_area_top, client_edges.left->width(), client_area_height);
690 } 690 }
691 691
692 void PanelBrowserFrameView::UpdateTitleBar() { 692 void PanelBrowserFrameView::UpdateTitleBar() {
693 title_label_->SetText(frame_->widget_delegate()->GetWindowTitle()); 693 title_label_->SetText(
694 UTF16ToWideHack(frame_->widget_delegate()->GetWindowTitle()));
694 } 695 }
695 696
696 void PanelBrowserFrameView::OnFocusChanged(bool focused) { 697 void PanelBrowserFrameView::OnFocusChanged(bool focused) {
697 UpdateSettingsButtonVisibility(focused, 698 UpdateSettingsButtonVisibility(focused,
698 mouse_watcher_->IsCursorInViewBounds()); 699 mouse_watcher_->IsCursorInViewBounds());
699 SchedulePaint(); 700 SchedulePaint();
700 } 701 }
701 702
702 void PanelBrowserFrameView::OnMouseEnterOrLeaveWindow(bool mouse_entered) { 703 void PanelBrowserFrameView::OnMouseEnterOrLeaveWindow(bool mouse_entered) {
703 // Panel might be closed when we still watch the mouse event. 704 // Panel might be closed when we still watch the mouse event.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 742
742 settings_menu_model_.reset( 743 settings_menu_model_.reset(
743 new PanelSettingsMenuModel(browser_view_->panel())); 744 new PanelSettingsMenuModel(browser_view_->panel()));
744 settings_menu_adapter_.reset( 745 settings_menu_adapter_.reset(
745 new views::MenuModelAdapter(settings_menu_model_.get())); 746 new views::MenuModelAdapter(settings_menu_model_.get()));
746 settings_menu_ = new views::MenuItemView(settings_menu_adapter_.get()); 747 settings_menu_ = new views::MenuItemView(settings_menu_adapter_.get());
747 settings_menu_adapter_->BuildMenu(settings_menu_); 748 settings_menu_adapter_->BuildMenu(settings_menu_);
748 settings_menu_runner_.reset(new views::MenuRunner(settings_menu_)); 749 settings_menu_runner_.reset(new views::MenuRunner(settings_menu_));
749 return true; 750 return true;
750 } 751 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/input_window_dialog_win.cc ('k') | chrome/browser/ui/views/about_chrome_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698