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

Side by Side Diff: chrome/browser/ui/views/browser_actions_container.cc

Issue 23812010: Implement first part of supporting global extension commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gclient sync Created 7 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) 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/browser_actions_container.h" 5 #include "chrome/browser/ui/views/browser_actions_container.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 extensions::ExtensionSystem::Get(profile_)->extension_service(); 77 extensions::ExtensionSystem::Get(profile_)->extension_service();
78 if (service) { 78 if (service) {
79 model_ = service->toolbar_model(); 79 model_ = service->toolbar_model();
80 model_->AddObserver(this); 80 model_->AddObserver(this);
81 } 81 }
82 82
83 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 83 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
84 browser->profile(), 84 browser->profile(),
85 owner_view->GetFocusManager(), 85 owner_view->GetFocusManager(),
86 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS, 86 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS,
87 this)), 87 this));
88 88
89 resize_animation_.reset(new gfx::SlideAnimation(this)); 89 resize_animation_.reset(new gfx::SlideAnimation(this));
90 resize_area_ = new views::ResizeArea(this); 90 resize_area_ = new views::ResizeArea(this);
91 AddChildView(resize_area_); 91 AddChildView(resize_area_);
92 92
93 chevron_ = new views::MenuButton(NULL, string16(), this, false); 93 chevron_ = new views::MenuButton(NULL, string16(), this, false);
94 chevron_->set_border(NULL); 94 chevron_->set_border(NULL);
95 chevron_->EnableCanvasFlippingForRTLUI(true); 95 chevron_->EnableCanvasFlippingForRTLUI(true);
96 chevron_->SetAccessibleName( 96 chevron_->SetAccessibleName(
97 l10n_util::GetStringUTF16(IDS_ACCNAME_EXTENSIONS_CHEVRON)); 97 l10n_util::GetStringUTF16(IDS_ACCNAME_EXTENSIONS_CHEVRON));
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 views::BubbleBorder::TOP_LEFT : views::BubbleBorder::TOP_RIGHT; 840 views::BubbleBorder::TOP_LEFT : views::BubbleBorder::TOP_RIGHT;
841 popup_ = ExtensionPopup::ShowPopup(popup_url, 841 popup_ = ExtensionPopup::ShowPopup(popup_url,
842 browser_, 842 browser_,
843 reference_view, 843 reference_view,
844 arrow, 844 arrow,
845 show_action); 845 show_action);
846 popup_->GetWidget()->AddObserver(this); 846 popup_->GetWidget()->AddObserver(this);
847 popup_button_ = button; 847 popup_button_ = button;
848 popup_button_->SetButtonPushed(); 848 popup_button_->SetButtonPushed();
849 } 849 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698