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

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

Issue 48853005: Remove ExtensionToolbarModel from ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile after rebase Created 7 years, 1 month 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 chevron_(NULL), 68 chevron_(NULL),
69 overflow_menu_(NULL), 69 overflow_menu_(NULL),
70 suppress_chevron_(false), 70 suppress_chevron_(false),
71 resize_amount_(0), 71 resize_amount_(0),
72 animation_target_size_(0), 72 animation_target_size_(0),
73 drop_indicator_position_(-1), 73 drop_indicator_position_(-1),
74 task_factory_(this), 74 task_factory_(this),
75 show_menu_task_factory_(this) { 75 show_menu_task_factory_(this) {
76 set_id(VIEW_ID_BROWSER_ACTION_TOOLBAR); 76 set_id(VIEW_ID_BROWSER_ACTION_TOOLBAR);
77 77
78 ExtensionService* service = 78 model_ = ExtensionToolbarModel::Get(browser->profile());
79 extensions::ExtensionSystem::Get(profile_)->extension_service(); 79 if (model_)
80 if (service) {
81 model_ = service->toolbar_model();
82 model_->AddObserver(this); 80 model_->AddObserver(this);
83 }
84 81
85 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 82 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
86 browser->profile(), 83 browser->profile(),
87 owner_view->GetFocusManager(), 84 owner_view->GetFocusManager(),
88 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS, 85 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS,
89 this)); 86 this));
90 87
91 resize_animation_.reset(new gfx::SlideAnimation(this)); 88 resize_animation_.reset(new gfx::SlideAnimation(this));
92 resize_area_ = new views::ResizeArea(this); 89 resize_area_ = new views::ResizeArea(this);
93 AddChildView(resize_area_); 90 AddChildView(resize_area_);
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 arrow, 867 arrow,
871 show_action); 868 show_action);
872 popup_->GetWidget()->AddObserver(this); 869 popup_->GetWidget()->AddObserver(this);
873 popup_button_ = button; 870 popup_button_ = button;
874 871
875 // Only set button as pushed if it was triggered by a user click. 872 // Only set button as pushed if it was triggered by a user click.
876 if (should_grant) 873 if (should_grant)
877 popup_button_->SetButtonPushed(); 874 popup_button_->SetButtonPushed();
878 return true; 875 return true;
879 } 876 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698