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

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

Issue 2398783002: Rename a bunch of Mojo Application stuff to reference Services. (Closed)
Patch Set: . Created 4 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
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/tabs/tab_drag_controller.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "ash/common/accelerators/accelerator_commands.h" // nogncheck 43 #include "ash/common/accelerators/accelerator_commands.h" // nogncheck
44 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" // nogncheck 44 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" // nogncheck
45 #include "ash/common/wm/window_state.h" // nogncheck 45 #include "ash/common/wm/window_state.h" // nogncheck
46 #include "ash/common/wm_shell.h" // nogncheck 46 #include "ash/common/wm_shell.h" // nogncheck
47 #include "ash/wm/window_state_aura.h" // nogncheck 47 #include "ash/wm/window_state_aura.h" // nogncheck
48 #include "ui/wm/core/coordinate_conversion.h" // nogncheck 48 #include "ui/wm/core/coordinate_conversion.h" // nogncheck
49 #endif 49 #endif
50 50
51 #if defined(USE_AURA) 51 #if defined(USE_AURA)
52 #include "chrome/browser/ui/views/tabs/window_finder_mus.h" // nogncheck 52 #include "chrome/browser/ui/views/tabs/window_finder_mus.h" // nogncheck
53 #include "content/public/common/mojo_shell_connection.h" // nogncheck 53 #include "content/public/common/service_manager_connection.h" // nogncheck
54 #include "services/shell/runner/common/client_util.h" // nogncheck 54 #include "services/shell/runner/common/client_util.h" // nogncheck
55 #include "ui/aura/env.h" // nogncheck 55 #include "ui/aura/env.h" // nogncheck
56 #include "ui/aura/window.h" // nogncheck 56 #include "ui/aura/window.h" // nogncheck
57 #include "ui/wm/core/window_modality_controller.h" // nogncheck 57 #include "ui/wm/core/window_modality_controller.h" // nogncheck
58 #endif 58 #endif
59 59
60 using base::UserMetricsAction; 60 using base::UserMetricsAction;
61 using content::OpenURLParams; 61 using content::OpenURLParams;
62 using content::WebContents; 62 using content::WebContents;
63 63
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 waiting_for_run_loop_to_exit_(false), 222 waiting_for_run_loop_to_exit_(false),
223 tab_strip_to_attach_to_after_exit_(NULL), 223 tab_strip_to_attach_to_after_exit_(NULL),
224 move_loop_widget_(NULL), 224 move_loop_widget_(NULL),
225 is_mutating_(false), 225 is_mutating_(false),
226 attach_x_(-1), 226 attach_x_(-1),
227 attach_index_(-1), 227 attach_index_(-1),
228 weak_factory_(this) { 228 weak_factory_(this) {
229 instance_ = this; 229 instance_ = this;
230 230
231 #if defined(USE_AURA) 231 #if defined(USE_AURA)
232 content::MojoShellConnection* mojo_shell_connection = 232 content::ServiceManagerConnection* service_manager_connection =
233 content::MojoShellConnection::GetForProcess(); 233 content::ServiceManagerConnection::GetForProcess();
234 if (mojo_shell_connection && shell::ShellIsRemote()) 234 if (service_manager_connection && shell::ShellIsRemote())
235 window_finder_.reset(new WindowFinderMus); 235 window_finder_.reset(new WindowFinderMus);
236 else 236 else
237 #endif 237 #endif
238 window_finder_.reset(new WindowFinder); 238 window_finder_.reset(new WindowFinder);
239 } 239 }
240 240
241 TabDragController::~TabDragController() { 241 TabDragController::~TabDragController() {
242 views::ViewStorage::GetInstance()->RemoveView(old_focused_view_id_); 242 views::ViewStorage::GetInstance()->RemoveView(old_focused_view_id_);
243 243
244 if (instance_ == this) 244 if (instance_ == this)
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 // TODO(pkotwicz): Fix this properly (crbug.com/358482) 1838 // TODO(pkotwicz): Fix this properly (crbug.com/358482)
1839 for (auto* browser : *BrowserList::GetInstance()) { 1839 for (auto* browser : *BrowserList::GetInstance()) {
1840 if (browser->tab_strip_model()->empty()) 1840 if (browser->tab_strip_model()->empty())
1841 exclude.insert(browser->window()->GetNativeWindow()); 1841 exclude.insert(browser->window()->GetNativeWindow());
1842 } 1842 }
1843 #endif 1843 #endif
1844 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr()); 1844 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr());
1845 *window = window_finder_->GetLocalProcessWindowAtPoint(screen_point, exclude); 1845 *window = window_finder_->GetLocalProcessWindowAtPoint(screen_point, exclude);
1846 return ref ? Liveness::ALIVE : Liveness::DELETED; 1846 return ref ? Liveness::ALIVE : Liveness::DELETED;
1847 } 1847 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc ('k') | chrome/test/base/mash_browser_tests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698